N=int(input()) import math def func(x,y,z): GCDxy=math.gcd(x,y) GCD=math.gcd(GCDxy,z) ans=x*y*z//GCD print(*[ans,ans,ans]) for i in range(N): x,y,z=map(int,input().split()) func(x,y,z)