n, x = [int(w) for w in input().split()] a = [int(w) for w in input().split()] def f(i, j): return (0, 0) if i>x and j>x else (i, j) l = [(0, 0, i, i) for i in a] while len(l) > 1: l = [f(t[0]+u[3], u[1]+t[2])+ (t[2], u[3]) for t, u in zip(l, l[1:])] print("A" if l[0][0] else "B")