# -*- coding: utf-8 -*- import numpy as np N = int(input()) A = list(map(float, input().split())) A = np.array(A) F = np.abs(np.fft.fft(A)) candidate = { 'C4': 261.6, 'D4': 294.3, 'E4': 327.0, 'F4': 348.8, 'G4': 392.4, 'A4': 436.0, 'B4': 490.5 } max_val = -1 ans = None for k, f in candidate.items(): val = F[int(np.round(f * 1.0))] if val > max_val: max_val = val ans = k for k, f in candidate.items(): if k != ans: val = F[int(np.round(f * 1.0))] assert(val < max_val * 0.001) print(ans)