#t176. 石头剪子布

石头剪子布

Rock Paper Scissors

Problem Description

Rock Paper Scissors is a finger-guessing game. Originating in China, it spread to Japan, Korea, and other places, and with the growing Eurasian trade it reached Europe, becoming popular worldwide in modern times. Its simple and clear rules leave no loophole to exploit: a single round is a contest of luck, while multiple rounds are a contest of psychological strategy. This ancient game combines both "chance" and "skill", and is beloved by people all over the world.

The rules: rock beats scissors, paper wraps rock, scissors cut paper.

Now you need to write a program to judge the results of Rock Paper Scissors games.

Input Format

The input consists of N+1N+1 lines:

The first line is an integer NN, indicating NN games were played in total. 1≤N≤1001 \le N \le 100.

Each of the next NN lines contains two strings, representing the choices (rock, scissors, or paper) of the participants Player1 and Player2:

S1 S2S_1\,S_2

The strings are separated by a space. S1,S2S_1, S_2 can only take values from {"Rock","Scissors","Paper"}\{"Rock", "Scissors", "Paper"\} (case-sensitive).

Output Format

Output NN lines, each corresponding to a winner (Player1Player1 or Player2Player2), or if the game is a tie, output TieTie.

Sample Input

3
Rock Scissors
Paper Paper
Rock Paper

Sample Output

Player1
Tie
Player2

Hint

RockRock is rock, ScissorsScissors is scissors, PaperPaper is paper.