import sys readline=sys.stdin.readline S=readline().rstrip() if S[0]=="D": ans="Alpha" elif S[0]=="Z": ans="1st" elif S[0]=="B": ans="2nd" elif S[0]=="S": ans="3rd" else: ans="4th" print(ans)