n = int(eval(input()))

ans = 0

ans = n*n*n

print(ans)
n = int(eval(input()))

print((n ** 3))

n = int(eval(input()))
ans = 0
ans = n * n * n
print(ans)

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

-ans = 0 -ans = n * n * n -print(ans) +print((n**3))