N = int(input()) lsHW = [[0]*N for i in range(N)] for i in range(N//2): for j in range(i,N//2): lsHW[i][j] = 1 for j in range(N//2,N): lsHW[i][j] = 2 for i in range(N//2,N): for j in range(N//2,N): lsHW[i][j] = 1 for j in range(i,N): lsHW[i][j] = 2 for i in range(N): print(*lsHW[i],sep='')