Rock, Paper, Scissors is a two-player game, where each player simultaneously chooses one of three items after counting to three. The game is played for a predetermined number of rounds. The player who wins the most rounds is declared the winner. Given the number of rounds and the results of each round, determine the winner.
The rules for determining the winner of each round are as follows:
Rock always beats Scissors (Rock crushes Scissors)
Scissors always beat Paper (Scissors cut Paper)
Paper always beats Rock (Paper covers Rock)
The first line contains the number of test cases (0 < t < 1000). For each test case, the first line contains the number of rounds (0 < n < 100) played in the game. Each of the following lines contains a capital letter (Rock), (Paper), or (Scissors), followed by a space, then another capital letter , , or . The first letter represents Player 1's choice; the second letter represents Player 2's choice.
For each test case, output the winner's name (Player 1 or Player 2) on a separate line. If the game ends in a tie, output TIE.
Example 1