import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    n=II()
    a1,a2=1,1
    ans=[[0]*n for _ in range(n)]
    for i in range(n):
        for j in range(i):
            ans[i][j]=ans[j][i]=a2
            a1,a2=a2,a1+a2

    for row in ans:print(*row)

main()