for i in range(4):
    print(i ** i ** i)