using static System.Math; using System.Text; using System; public class Hello { static void Main() { var sb = new StringBuilder(); var T = int.Parse(Console.ReadLine().Trim()); while (T-- > 0) { string[] line = Console.ReadLine().Trim().Split(' '); var a = long.Parse(line[0]); var b = long.Parse(line[1]); var c = long.Parse(line[2]); getAns(a, b, c, sb); } Console.Write(sb); } static void getAns(long a, long b, long c, StringBuilder sb) { var abt0 = Abs(a - c); var y = (abt0 / b + 1L) * b; var abt1 = Abs(y - c); var x = (abt1 / a + 1L) * a; var abt2 = Abs(x - y); var z = (abt2 / c + 1L) * c; sb.Append(string.Format("{0} {1} {2}", x, y, z) + "\n"); } }