#include <iostream>
using namespace std;
int main() {
int n, i, j;
cin >> n;
int arr[n][n];
for (i=0; i<n; i++){ //Filas
for (j=0; j<n; j++){ //Columnas
if((i+j)%2 == 1) arr[i][j] = 1;
else arr [i][j] = 0;
}
}
for (i=0; i<n; i++){ //Filas
for (j=0; j<n; j++){ //Columnas
cout << arr[i][j] << ' ';
}
cout << '\n';
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbiwgaSwgajsKCWNpbiA+PiBuOwoJaW50IGFycltuXVtuXTsKCQoJZm9yIChpPTA7IGk8bjsgaSsrKXsgIC8vRmlsYXMKCQlmb3IgKGo9MDsgajxuOyBqKyspeyAgLy9Db2x1bW5hcwoJCQlpZigoaStqKSUyID09IDEpIGFycltpXVtqXSA9IDE7CgkJCWVsc2UgYXJyIFtpXVtqXSA9IDA7CgkJfQoJfQoJZm9yIChpPTA7IGk8bjsgaSsrKXsgIC8vRmlsYXMKCQlmb3IgKGo9MDsgajxuOyBqKyspeyAgLy9Db2x1bW5hcwoJCQljb3V0IDw8IGFycltpXVtqXSA8PCAnICc7CgkJfQoJCWNvdXQgPDwgJ1xuJzsKCX0KCQoJcmV0dXJuIDA7Cn0=