x=int(eval(input()))

print((x * x * x))
x=int(input())

print(x**3)
x = int(eval(input()))
print((x * x * x))

x = int(input())
print(x**3)

-x = int(eval(input())) -print((x * x * x)) +x = int(input()) +print(x**3)