n = int(input()) sum1 = 0 sum2 = 1 x = 999999999 for i in range(1, n + 1): if i >= 2: x = sum1 - n + 1 print() sum1 = sum2 sum2 = sum2 + i for j in range(1, n + 1): if sum1 <= x: print(sum1, end=" ") sum1 = sum1 + j + i