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[] a = 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; a[i] = o; } Arrays.sort(a, (o1, o2) -> o1.a - o2.a); if (a[0].x + a[1].x <= a[2].x) { a[0].x = (a[1].x + a[2].x - 1) / a[0].a * a[0].a; } Arrays.sort(a, (o1, o2) -> o1.i - o2.i); System.out.println(a[0].x + " " + a[1].x + " " + a[2].x); } pw.flush(); br.close(); } static class Obj { int i, a; long x; } }