for _ in range(int(input())): A = int(input()) a2 = A**2 n = 0 while a2%2**(n+1) == 0: n += 1 d = a2//2**n print(A, 2**n*(d//2), 2**n*(d//2+1))