t=int(input()) for i in range(1,t+1): print("#"+str(i),int(input())**2)