music=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B","C"] a=input() for x in range(len(music)): if a==music[x]: print(music[x+1]) break