n = int(input()) a = list(map(int,input().split())) import random ll = [] for _ in range(2000): shikii = round(max(a) * random.uniform(0.8, 0.9)) peek = [-10 ** 9] for i in range(100, n - 100): if a[i] >= shikii and abs(peek[-1] - i) >= 89: peek.append(i) peek = peek[1:] l = len(peek) if l <= 2: continue f = [] for i in range(l - 1): f.append(n / (peek[i + 1] - peek[i])) f.sort() f = f[round(3 * l / 4)] 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 ll.append(ans) from collections import Counter ll = Counter(ll) print(ll.most_common()[0][0])