# Arup Guha
# 7/22/2014
# Solution to 2014 SI@UCF Final Contest Problem: Cube

def main():

    # Open file.
    myFile = open("cube.in", "r")
    numCases = int(myFile.readline())

    # Easy in python which naturally has long numbers.
    for loop in range(numCases):
        s = int(myFile.readline())
        print(s**3)

    myFile.close()

main()
