using static System.Math; using System; public class Hello { static void Main() { 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); } } static void getAns(long a, long b, long c) { var t = Abs( a-c); var y = (t / b + 1L) * b; var abt = Abs(y - c); var x = (abt / a + 1L) * a; Console.WriteLine("{0} {1} {2}",x,y,c); } }