import sys from sys import stdin import math def get(idx): i = int(idx) rem = idx - i if i + 1 >= len(A): return None ret = A[i] * (1-rem) + A[i+1] * rem return ret N = int(stdin.readline()) A = list(map(int,stdin.readline().split())) DF = [261.6,294.3, 327.0, 348.8, 392.4, 436.0, 490.5] DN = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"] S = [] for freq in DF: ONE = N / freq nsum = 0 nnum = 0 for i in range(N): cat = get(i+ONE) if cat == None: break nsum += abs(cat - A[i])**2 nnum += 1 S.append( nsum / (nnum)**2 ) MI = min(S) print (S,file=sys.stderr) for i in range(6): if S[i] == MI: print (DN[i]) break