n = input().strip().split(" ") m = input().strip().split(" ") n.sort(reverse=True) m.sort(reverse=True) for i in range(0, len(n)): n[i]=int(n[i]) m[i]=int(m[i]) if m==n: print("remis") elif sum(n)>sum(m): print("Algosia") elif sum(m)>sum(n): print("Bajtek") elif sum(m)==sum(n): for i in range(0, len(n)): if n[i]>m[i]: print("Algosia") break elif m[i]>n[i]: print("Bajtek") break # n[i]=int(n[i]) # m[i]=int(m[i]) # print(n) # print(m) # n=n
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | n = input().strip().split(" ") m = input().strip().split(" ") n.sort(reverse=True) m.sort(reverse=True) for i in range(0, len(n)): n[i]=int(n[i]) m[i]=int(m[i]) if m==n: print("remis") elif sum(n)>sum(m): print("Algosia") elif sum(m)>sum(n): print("Bajtek") elif sum(m)==sum(n): for i in range(0, len(n)): if n[i]>m[i]: print("Algosia") break elif m[i]>n[i]: print("Bajtek") break # n[i]=int(n[i]) # m[i]=int(m[i]) # print(n) # print(m) # n=n |