using System;

class myclass
{
    public static void Main()
    {
        string s;
        int g,x=0;
        int[] k=new int[20];
        for (int i = 0; i < 20; i++){
            s = Console.ReadLine();
            if (s == "EOF"){
                x = i;
                break;
            }
            g = Int32.Parse(s);
            k[i] = g % 39;
        }
        for (int i = 0; i < x; i++){
            if (k[i] == 0)
            {
                Console.WriteLine("3C39");
            }
            else if (k[i] < 10)
            {
                Console.WriteLine("3C0" + k[i]);
            }
            else Console.WriteLine("3C" + k[i]);

        }
    }
}