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") elif s[0] == 'D': print("Alpha")