i = int(eval(input()))

print((str(i*i*i)))
tmp = int(eval(input()))



ans = tmp * tmp * tmp



print(ans)





i = int(eval(input()))
print((str(i * i * i)))

tmp = int(eval(input()))
ans = tmp * tmp * tmp
print(ans)

-i = int(eval(input())) -print((str(i * i * i))) +tmp = int(eval(input())) +ans = tmp * tmp * tmp +print(ans)