S = input() a = ['C', 'C#','D', 'D#', 'E','F','F#','G' 'G#', 'A', 'A#', 'B','C','C#' ] M = a.index(S) k = M + 1 print(a[k])