import numpy as np import math sound = {261.6: "C4", 294.3: "D4", 327.0: "E4", 348.8: "F4", 392.4: "G4", 436.0: "A4", 490.5: "B4"} n = int(input()) a = np.array(list(map(int, input().split()))) ans = "" min_norm = math.inf for freq, kind in sound.items(): cycle = int(n/freq) b = a[:-cycle]-a[cycle:] norm = np.linalg.norm(b) if norm < min_norm: min_norm = norm ans = kind print(ans)