import numpy as np n = int(input()) A = np.array(map(int, input().split())) A = A / 32768 Data = np.abs(np.fft.fft(A)) Freq = np.fft.fftfreq(Data.shape[0], d=1.0/n) idx = Data.maxarg() diff = 1000 ans = 0 F = [261.6, 294.3, 327.0, 348.8, 392.4, 436.0, 490.5] S = ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4'] for i in range(7): d = abs(Freq[idx] - F[i]) if d < diff: diff = d ans = S[i] print(ans)