t = int(eval(input()))

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

print((x**3))

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

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

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