x=int(eval(input()))

a= x*x*x

print (a)
a=int(eval(input()))

print((a*a*a))

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

a = int(eval(input()))
print((a * a * a))

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