import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### ni() n = 44100 m = 500000 a = na() def f(x): r = floor(x) #print(x-r,1-x+r) return a[r]*(x-r)+a[r+1]*(1-x+r) z = [261.6, 294.3, 327.0, 348.0, 392.4, 436.0, 495.0] from math import floor from random import random as rand, randint eps = 100 ans = [] for i in range(7): x = n/z[i] # xの周期があるか調べる r = floor(z[i])-1 # r個の区間[0, x),[x,2*x],,,,[(r-1)x, rx) d = 0 for i in range(m): p,q = randint(0,r-1),randint(0,r-1) y = rand()*x if abs(f(y+p*x)-f(y+q*x))<=eps: d += 1 ans.append(d) #print(ans) p = ans.index(max(ans)) print(chr(p+65+2)+"4")