n = int(input())
fib = 1
if n < 10:
    fib = [1, 2, 4, 7, 12, 20, 33, 54, 88]
else:
    fib = [1, 2, 3, 5, 8, 13, 21, 34, 55]
prod = [1] * 10
for i in range(1,9):
    prod[i] = prod[i-1] * fib[i]
    

ans = [[0] * n for i in range(n)]
for i in range(n):
    for j in range(i+1, n):
        ans[i][j] = ans[j][i] = fib[j-i-1] * prod[n-2-i]


for i in range(n):
    print(" ".join(list(map(str, ans[i]))))
    