s = input() d = {"Z": "1st", "B": "2nd", "S": "3rd", "E": "4th", "D": "Alpha"} print(d[s[0]])