Q=int(input()) for _ in range(Q): L=int(input()) if L%2==1: y=(L**2+1)//2 x=(L**2-1)//2 else: p=(L**2)//2 y=(p+2)//2 x=(p-2)//2 print(x,y,L)