N = int(input()) for i in range(N): l = [n*(n+1)//2-i for n in range(1,N+1)] # 每行根据公式更新列表l print(*l[i:])