import math import cmath def main(): N = int(input()) *A, = map(int, input().split()) melody = [ ("C4", 261.6), ("D4", 294.3), ("E4", 327.0), ("F4", 348.8), ("G4", 392.4), ("A4", 436.0), ("B4", 490.5), ] ans = 0 ansv = 0 for m, f in melody: angle = 2*math.pi*f/N s = 0 for i in range(N): s += A[i] * cmath.exp(angle*1j) if ans < abs(s): ans = abs(s) ansv = m print(ansv) if __name__ == '__main__': main()