a=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"] print(a[(a.index(input())+1)%12])