T=int(input()) for _ in range(T): l=int(input()) if l%2: a,b=l*l,1 else: a,b=l*l//2,2 print(l,(a+b)//2,(a-b)//2)