while True:
    try:
        n1 = int(input())
        A = []
        temp = 1
        #构建一个列表存储每行第一个元素
        for i in range(0,100):
            temp = temp + i
            A.append(temp)
        for m in range(0,n1):
            res = [False]*(n1-m)
            res[0] = str(A[m])
            for k in range(1,n1-m):
                res[0] = str(A[m])
                res[k] = str(int(res[k-1])+k+m+1)
            print(' '.join(res))
#         n = 0
#         res = [False]*(n1-0)
#         for k in range(1,n1-0):
#             res[0] = 1
#             res[k] = int(res[k-1])+k+1
        
        
        
    except:
        break