#include using namespace std; using ll = long long; int a[500][500]; int main() { int n; cin >> n; int m = n / 2; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { a[i][j] = 0; } } for (int i = 0; i < m; i++) { for (int j = 0; j < m; j++) { a[i + m][j] = 2; } } for (int i = m - 1; i >= 0; i--) { int k = i + 1; for (int j = m - 1; j >= 0; j--) { int t; if (j > i) { t = a[i][j]; } else { t = min(k, 2); a[i][j] = t; a[j][i] = t; } k -= t; } } for (int i = 0; i < m; i++) { for (int j = 0; j < m; j++) { a[i + m][j + m] = 2 - a[i][j]; } } for (int i = m - 1; i >= 0; i--) { int k = i; for (int j = m - 1; j >= 0; j--) { int t; if (j > i) { t = a[i][j]; } else { t = min(k, 2); a[i][j] = t; a[j][i] = t; } k -= t; } } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout << a[i][j]; } cout << '\n'; } return 0; }