#P10352. Kto wygrał?
Kto wygrał?
Kto wygrał?
This problem is translated from the PA 2024 Contest Round 1 problem Kto wygrał?.
In an online contest, there are \(18\) tasks, each awarding a score between \(0\) and \(10\) points. Contestants are ranked based on the total score. If two contestants have an equal total score, the ranking is determined by comparing the number of tasks with a score of \(10\), then \(9\), and so on down to \(0\). If the contestants remain indistinguishable after all comparisons, the result is declared a tie.
You are given the scores of two contestants: Algosia and Bajtek. Your task is to determine which contestant is ranked higher. Output "Algosia" if Algosia ranks higher, "Bajtek" if Bajtek ranks higher, or "Tie" if they are exactly the same.
inputFormat
The input consists of two lines. Each line contains \(18\) space-separated integers, representing the scores for each of the 18 tasks for a contestant. The first line corresponds to Algosia's scores, and the second line corresponds to Bajtek's scores.
outputFormat
Output a single line containing one of the following: "Algosia", "Bajtek", or "Tie", according to the ranking rules described above.
sample
10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0
9 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0
Algosia