from math import gcd from functools import reduce from sys import stdin def main(): input = lambda: stdin.readline()[:-1] lcm = lambda x, y: x * y // gcd(x, y) T = int(input()) for _ in [0] * T: A, B, C = map(int, input().split()) l = reduce(lcm, [A, B, C]) print(l, l, l) main()