#T131. 石头剪子布

石头剪子布

Description

Rock-paper-scissors is a hand game. Originating in China, it later spread to Japan, Korea, and other regions. With the continuous development of trade between Asia and Europe, the game reached Europe and gradually gained worldwide popularity in modern times.

The simple and clear rules of rock-paper-scissors leave no room for exploiting loopholes. A single round relies on luck, while multiple rounds involve psychological strategy, giving this ancient game both elements of "chance" and "skill," making it beloved by people around the world.
Game rules: Rock crushes scissors, paper wraps rock, and scissors cut paper.

Now, you need to write a program to determine the results of rock-paper-scissors games.

Input Format

The first line is an integer N, indicating the total number of games played. 1 ≤ N ≤ 100.
Each of the next N lines contains two strings, representing the choices (rock, scissors, or paper) of the two players, Player1 and Player2:
S1 S2
The strings are separated by a space. S1 and S2 can only take values from {"Rock", "Scissors", "Paper"} (case-sensitive).

Output Format

The output consists of N lines, each corresponding to the winner (Player1 or Player2) of that round. If the game ends in a tie, output "Tie".

3
Rock Scissors
Paper Paper
Rock Paper


Player1
Tie
Player2