#!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect import numpy as np def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def IR(n): return [I() for _ in range(n)] def LIR(n): return [LI() for _ in range(n)] sys.setrecursionlimit(1000000) mod = 1000000007 import matplotlib.pyplot as plt hz = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] ch = ["C4", "D4", "E4", "F4", "G4", "A4", "B4"] def main(): n = I() a = np.array(LI()) acf = np.fft.ifft(a).real max_ = 0 argmax = None for index,f in enumerate(hz): i = round(f) s = 0 for j in range(i-1,i+2): s += abs(acf[j]) if max_ < s: max_ = s argmax = index print(ch[argmax]) return if __name__ == "__main__": main()