#include <iostream>
#include <algorithm>

using namespace std;

void solve() {
	for (int i = 1; i <= 16; ++i) {
		for (int j = 1; j <= 16; ++j) {
			if ((i+j)% 2 == 0) {
				cout << 2;
			} else {
				cout << 1;
			}
			cout << " ";
		}
		cout << "\n";
	}
}

int main() {
	int tests = 1;

	for (;tests; --tests) {
		solve();
	}
}