## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

# [Solution] Best of Two CodeChef Solution 2023 | Problem Code: DICEGAME2

Problem
Alice and Bob are playing a game. Each player rolls a regular six faced dice 3 times.

The score of a player is the sum of the values of the highest 2 rolls. The player with the highest score wins, and the game ends in a Tie if both players have the same score.

Find the winner of the game or determine whether it is a tie.

Input Format
The first line of input will contain a single integer T, denoting the number of test cases.
Each test case contains six space-separated integers A1, A2, A3, B1, B2, B3 - the values Alice gets in her 3 dice rolls, followed by the values which Bob gets in his 3 dice rolls.

Output Format
For each test case, output on a new line Alice if Alice wins, Bob if Bob wins and Tie in case of a tie.

Note that you may print each character in uppercase or lowercase. For example, the strings tie, TIE, Tie, and tIe are considered identical.

### Constraints

• $1\le �\le 1{0}^{4}$
• $1\le {�}_{1},{�}_{2},{�}_{3},{�}_{1},{�}_{2},{�}_{3}\le 6$
Explanation:

Test Case $1$: Alice's score is $8=\left(3+5\right)$ which is greater than Bob's score $7=\left(6+1\right)$.

Test Case $2$: Alice's score is $9=\left(5+4\right)$ which is less than Bob's score $10=\left(6+4\right)$.

Test Case $3$: Alice's score is $12=\left(6+6\right)$ which is same as Bob's score $12=\left(6+6\right)$.