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