N = int(input()) l = [n*(n+1)//2 for n in range(1,N+1)] print(*l) for i in range(N-1): l = [i-1 for i in l] print(*l[i+1:])