Drone Control

You are designing a controller for an interesting aircraft called the Single Copter.
It only has one propeller, but the outgoing air flow is further shaped by four flaps
that control three Euler angles (pitch, roll and yaw) that help maintain the requested
orientation of the craft. Each of these flaps can assume any angle requested by the flight
controller, and the effects of the flaps being at certain angles should translate to exerting
the requested forces on pitch, roll and yaw.

figure[!h]
tabularccc
pitch.png &
roll.png &
yaw.png 

Pitch & Roll & Yaw
tabular
Pitch, roll and yaw on a Single Copter
figure

Define the angles of the flaps to be , , , and  (for "north", "east", "south"
and "west" respectively). The forces in the directions of pitch, roll and yaw are defined by
the following equations:

align*
    p &= e - w 

    r &= n - s 

    y &= n + e + s + w
align*

As there are four variables and three constraints, you decided that, from the perspective of
aerodynamics, it makes sense to make the maximum of the flap angles as small as possible,
that is, you additionally want to minimise .

Find the best parameters to send to the Single Copter to achieve the desired pitch,
yaw, and roll.

Input

itemize
  One line containing the number , , the number of requests to follow.
   further lines, each containing three real numbers , , 
().
itemize

Output

Output  lines. In the -th line, output the solution for the -th request,
four numbers , , , , separated by whitespace.

Your answer will be considered correct if the resulting pitch, roll and yaw
differ by at most  from the requested ones, and the maximum
of the absolute values of flap outputs does not exceed the true value by more than .
