#include using namespace std; int N, A[1009][1009]; int main() { cin >> N; if (N % 2 == 1) { cout << "No" << endl; } else if (N % 2 == 0) { for (int i = 1; i <= N; i++) { for (int j = 1; j <= N; j++) { if (i + j < N + 1) { A[i][j] = 0; } else if (i + j == N + 1) { if (i <= (N / 2)) A[i][j] = 1; else A[i][j] = 2; } else { A[i][j] = 2; } } } for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) cout << A[i][j]; cout << endl; } } return 0; }