N = int(raw_input())
A = [[0] * N for _ in xrange(N)]
from random import randint as ri

for i in xrange(N):
    for j in xrange(i):
        A[i][j] = A[j][i] = ri(1, 10**10 - 1)

for row in A:
    print " ".join(map(str, row))
    
