#include using namespace std; const int NMax = (1 << 13); int v[100][100]; int main() { //freopen("test.in", "r", stdin); int n = 16; int k = 0; for(int i = 1; i <= n; i++) { k = i % 2; for(int j = 1; j <= n; j++) { cout << k + 1 << " "; k ^= 1; } cout << "\n"; } return 0; }