Under construction

Still being built. Things may change

Who Won?

Interview

Time limit2sMemory limit1024 MB

Summary
Given two sets of 18 problem scores, decide who ranks higher by total, then by the count of 10s, 9s, and so on, or report a tie.
Level

Easy2 of 10

Topics
Array, Implementation
Solved
No attempts yet

Statement

Algosia and Bajtek like to compete in Potyczki Algorytmiczne. The remote round has 18 problems, and each problem awards between 0 and 10 points. Contestants are ranked by their total score. If totals are tied, the contestant with more problems scored at 10 points ranks higher. If still tied, the contestant with more problems scored at 9 points ranks higher, and so on. If the contestants cannot be separated this way, they share a tied place.

Algosia and Bajtek remember their scores on every problem from the last edition, but they do not remember who placed higher. Write a program that reads their scores and reports which of them placed higher.

Input

The first line contains 18 integers from 0 to 10, the scores of Algosia on each problem in order.

The second line contains 18 integers from 0 to 10, the scores of Bajtek on each problem in order.

Output

Print one word on a single line: "Algosia" or "Bajtek", the name of the contestant who placed higher. If they tied, print "remis" instead of a name.

Hint

In the example, Algosia and Bajtek both have exactly 161 points. Under the rules of Potyczki Algorytmiczne, however, Algosia has the better result.

Examples1

  1. Example 1

    Input
    10 10 7 10 10 10 10 10 10 10 10 10 0 10 4 10 10 10
    10 10 10 10 10 10 10 10 10 10 10 10 4 3 4 10 10 10
    
    Expected output
    Algosia