n = int(input()) A = list(map(int, input().split())) ma = -33000 mi = 33000 for a in A: ma = max(a, ma) mi = min(a, mi) mid = (ma + mi) / 2 thr = (ma + 2 * mid) / 3 thl = (mi + 2 * mid) / 3 cnt = 0 t = 0 for a in A: if t == 0 and a > thr: cnt += 1 t = 1 elif t == 1 and a < thl: t = 0 lst = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] mi = 1000 for l in lst: d = abs(l - cnt) if d < mi: mi = d ans = l print(["C4", "D4", "E4", "F4", "G4", "A4", "B4"][lst.index(ans)])