As IPL 2017 is in full swing and points table is getting in with big changes. Being a viewer we love to enjoy the game. And there exist a category of people who wants to make Money from it.
RsamJ is one of them, he had a very bad time till now in this season. And after doing some research and calculation he made a formula which approximately tells that which team will Win the game.
The Formula is as follows,
chances to Win the Game, this is knows as Sub-Formula A
chances to Win the game, this is known as Sub-Formula B
You will be given values of X,Y,P,Q,R,T .
Your task is to find out the approximation of which team will Win the next N matches. (if both teams manage to play against each-other for next N matches)
Inputs
First line of input will contain T test cases. Next T lines will tell you X1 X2 Y1 Y2 P1 P2 Q1 Q2 R1 R2 T1 T2 N
Here X1,Y1,P1,Q1,R1,T1 belongs to First team and X2,Y2,P2,Q2,R2,T2 belongs to Second Team
Output
For each test case, print the result of next N matches in single line separated by single space , denoting teams 1 for First Team and 2 for Second Team
Constraints
1<= T <= 100
1<= X1,Y1,P1,R1,Q1,T1
1<= X2,Y2,P2,R2,Q2,T2
1<= N
5 6 9 14 14 9 2 94 55 35 12 18 5 4 7 8 13 16 9 4 91 19 52 42 10 9 3 7 6 16 12 3 1 21 55 88 14 12 3 7 4 3 11 6 4 7 12 94 89 39 6 13 6 2 7 6 15 3 4 8 86 41 66 9 11 2