import sys n = int(input()) t = 1 for i in range(n): s = t for j in range(i+1, n+1): print(s, end=" ") s = s + j + 1 print(' ') t = t + i + 1