import sys from sys import stdin import math import random def get(idx): i = int(idx) rem = idx - i if i + 1 >= len(A) or i < 0: 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 diffmax = 0 for i in range(10**5): L = random.uniform(0,N-1-ONE) catL = get(L) catR = get(L+ONE) if catL != None and catR != None: diffmax = max( diffmax , abs(catL - catR) ) S.append( diffmax ) MI = min(S) print (S,file=sys.stderr) for i in range(6): if S[i] == MI: print (DN[i]) break