In the picture below you can see a triangle ABC. Point D, E and F divides the sides BC, CA and AB into m1:m2, m3:m4 and m5:m6 ratios respectively. A, D; B, E and C, F are connected. AD and BE intersects at P, BE and CF intersects at Q and CF and AD intersects at R.

So now a new triangle PQR is formed. Given triangle ABC it is very easy to find triangle PQR, but given triangle PQR it is not straight forward to find ABC. Your task is now to do that.
First line of the input file contains an integer N (0 < N < 25001) which denotes how many sets of inputs are there. Input for each set contains six floating-point number Px, Py, Qx, Qy, Rx, Ry. (0 ≤ Px, Py, Qx, Qy, Rx, Ry ≤ 10000) in one line and six positive integers m1, m2, m3, m4, m5, m6 (m1 < m2, m3 < m4 and m5 < m6) in another line. These six numbers denote that the coordinate of points P, Q and R are (Px, Py), (Qx, Qy) and (Rx,Ry) respectively. P, Q and R will never be collinear and will be distinct and there will always be a triangle ABC for the given input triangle PQR. Also note that P, Q and R will be given in counter clockwise order in the input.
For each line of input produce one line of output. This line contains six floating-point numbers. These six integers denote the coordinates of A, B and C. That is the first two integers denote the coordinate of A, the third and fourth integers denote the coordinate of B and fifth and sixth integers denotes the coordinate of C. A, B and C will appear counter clockwise order. All the output numbers should have eight digits after the decimal point.