local q = io.read("*n") for iq = 1, q do local a, b, c = io.read("*n", "*n", "*n") local ta, tb, tc = 1LL * a, 1LL * b, 1LL * c while true do if ta + tb <= tc then if ta < tb then ta = ta + ta else tb = tb + tb end elseif tb + tc <= ta then if tb < tc then tb = tb + tb else tc = tc + tc end elseif tc + ta <= tb then if tc < ta then tc = tc + tc else ta = ta + ta end else break end end a = tostring(ta):gsub("LL", "") b = tostring(tb):gsub("LL", "") c = tostring(tc):gsub("LL", "") print(a .. " " .. b .. " " .. c) end