S=input() if S[0]=="Z": print("1st") elif S[0]=="B": print("2nd") elif S[0]=="S": print("3rd") elif S[0]=="E": print("4th") else: print("Alpha")