def func(x):
    result = [ [int(((i+j)*(i+j+1)/2+j+1)) for j in range(x-i)] for i in range(x)]
    return result

while True:
    try:
        a = int(input())
        b = func(a)
        for i in range(len(b)):
            print(*b[i])
    except:
        break