import numpy as np import bisect n = int(input()) a = list(map(int, input().split(' '))) f = np.fft.fft(a) freq = np.fft.fftfreq(n, 1/n) amp = np.abs(f/(n/2)) l = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] max = 0 maxval = 0.0 for i in range(len(l)): idx = bisect.bisect_left(freq[0:len(freq)//2], l[i]) buf = amp[idx] if maxval < buf: max = i maxval = buf if max == 0: print("C4") if max == 1: print("D4") if max == 2: print("E4") if max == 3: print("F4") if max == 4: print("G4") if max == 5: print("A4") if max == 6: print("B4")