The PokerStars team has came up with a new form of poker. They weren't very original so it is almost like Texas Hold'em but each player receives $$$5$$$ cards and there are only $$$2$$$ cards on the table (do not worry, the rules will be explained in more detail below).
They want to inaugurate it with a broadcasted competition but they need something from you. In order to make it more interesting for the viewers they want to show them the probability of each player of winning after all of them received their cards. Can you help them?
Game Rules :
Poker Hands (from the highest to the lowest) :
If 2 players have the same type of hand :
Note : A kicker is the set of cards in a standard five-card poker hand which are not the part of the hand which makes its rank. The kicker is used to break ties between poker hands of otherwise equivalent rank.
Because the PokerStars team does not like split pots, if after all the criteria above are applied and the $$$2$$$ players are still at a tie, the player with the smallest index wins (formally, player $$$i$$$ beats player $$$j$$$ if $$$i \lt j$$$).
The first line of the input will contain the number $$$T$$$ ($$$1 \leq T \leq 30$$$), representing the number of test cases.
The first line of each test will contain one positive integer $$$N$$$, the number of players.
The next $$$5*N$$$ lines will contain the cards of each player, player $$$i$$$ ($$$1 \leq i \leq N$$$) will have the cards from line $$$(i-1)*5+1$$$ to line $$$(i-1)*5+4$$$.
Each card is represented by $$$2$$$ strings, $$$rank$$$ and $$$suit$$$:
It is guaranteed that all cards in a test case are distinct.
The output file should consist of one line for each test case.
Each line should contain $$$N$$$ numbers (where $$$N$$$ is the number of players for each test case), the probabilities of winning the game for each player.
The probability of winning the game for player $$$i$$$ can be expressed by $$$P_i/Q$$$ where $$$P_i$$$ represents the number of cases where player $$$i$$$ wins and $$$Q$$$ represents the number of total cases. You should output the probability of winning the game for player $$$i$$$ as $$$P_i*Q^{-1}$$$ modulo $$$100055128505716009$$$.
1 4 2 clubs 4 diamonds 7 hearts J spades Q clubs 2 diamonds 4 hearts 7 spades J clubs Q diamonds 2 hearts 4 spades 7 clubs J diamonds Q hearts 2 spades 4 clubs 7 diamonds J hearts Q spades
1 0 0 0
The example consists of only one test case.
In the example, player 1 wins all the possible outcomes.