import sys sys.setrecursionlimit(10 ** 6) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LC(): return list(input()) def IC(): return [int(c) for c in input()] def MI(): return map(int, sys.stdin.readline().split()) INF = float('inf') def solve(): import math from functools import reduce def my_lcm_base(x, y): return (x * y) // math.gcd(x, y) def my_lcm(*numbers): return reduce(my_lcm_base, numbers, 1) T = II() for i in range(T): ABC = LI() LCM = my_lcm(*ABC) print(LCM,LCM,LCM) return solve()