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