n = int(input()) a = list(map(int,input().split())) shikii = (max(a)) peek = [] for i in range(n): if a[i] >= shikii: peek.append(i) l = len(peek) f = 0 for i in range(l - 1): f += n / (peek[i + 1] - peek[i]) assert l >= 1 exit() f = f / (l - 1) sa = 10 ** 9 ans = None li = [(261.6, 'C4'), (294.3, 'D4'), (327.0, 'E4'), (348.8, 'F4'), (392.4, 'G4'), (436.0, 'A4'), (490.5, 'B4')] for v, c in li: if abs(f - v) < sa: sa = abs(f - v) ans = c print(ans)