import java.io.*; import java.util.*; public class copter_mb { public static void main(String[] args) throws IOException { try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out)) { int n = Integer.parseInt(in.readLine()); for (int i = 0; i < n; ++i) { StringTokenizer st = new StringTokenizer(in.readLine()); double pitch = Double.parseDouble(st.nextToken()) / 2; double roll = Double.parseDouble(st.nextToken()) / 2; double yawSum = Double.parseDouble(st.nextToken()) / 2; double yawRollAbs = (Math.abs(pitch) - Math.abs(roll) + Math.abs(yawSum)) / 2; yawRollAbs = Math.max(0, yawRollAbs); yawRollAbs = Math.min(Math.abs(yawSum), yawRollAbs); double yawRoll = yawRollAbs * Math.signum(yawSum); double yawPitch = yawSum - yawRoll; out.println((roll + yawRoll) + " " + (pitch + yawPitch) + " " + (-roll + yawRoll) + " " + (-pitch + yawPitch)); } } } }