import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Arrays; 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()); PrintWriter pw = new PrintWriter(System.out); for (int z = 0; z < t; z++) { String[] sa = br.readLine().split(" "); Obj[] arr = new Obj[3]; for (int i = 0; i < 3; i++) { Obj o = new Obj(); o.i = i; o.a = Integer.parseInt(sa[i]); o.x = o.a; arr[i] = o; } Arrays.sort(arr, (o1, o2) -> o1.a - o2.a); while (arr[0].x + arr[1].x <= arr[2].x) { arr[0].x += arr[0].a; } Arrays.sort(arr, (o1, o2) -> o1.i - o2.i); System.out.println(arr[0].x + " " + arr[1].x + " " + arr[2].x); } pw.flush(); br.close(); } static class Obj { int i, a; long x; } }