import java.util.*; import java.io.*; public class Main { public static void main (String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); StringBuilder sb = new StringBuilder(); for (int i = 0; i < t; i++) { String[] line = br.readLine().split(" ", 3); int a = Integer.parseInt(line[0]); int b = Integer.parseInt(line[1]); int c = Integer.parseInt(line[2]); long lcm = getLCM(a, b, c); sb.append(lcm).append(" ").append(lcm).append(" ").append(lcm).append("\n"); } System.out.print(sb); } static long getLCM(long a, long b, long c) { return getLCM(getLCM(a, b), c); } static long getLCM(long a, long b) { return a / getGCD(a, b) * b; } static long getGCD(long a, long b) { if (a % b == 0) { return b; } else { return getGCD(b, a % b); } } }