using static System.Console;
using System.Linq;

class Program
{
    static void Main()
    {
        Solve();
    }
    static void Solve()
    {
        var s = ReadLine();
        if (s[0] == 'Z') WriteLine("1st");
        else if (s[0] == 'B') WriteLine("2nd");
        else if (s[0] == 'S') WriteLine("3rd");
        else if (s[0] == 'E') WriteLine("4th");
        else WriteLine("Alpha");
    }
}