n = int(input()) r = [[0]*n for _ in range(n)] for i in range(n): for j in range(n): if i < n//2 and i+j == n-1: r[i][j] = 1 elif i+j >= n: r[i][j] = 2 for ri in r: print("".join(map(str,ri)))