from math import gcd t=int(input()) for _ in range(t): a,b,c=map(int,input().split()) a=a*b//gcd(a,b) a=a*c//gcd(a,c) print(a,a,a)