#include <iostream>
using namespace std;

int main()
{
    int n;
    while(cin >> n){
        int a = n%39;
        if(a==0)
            a=39;
        if(a < 10)
            cout << "3C0" << a << endl;
        else
            cout << "3C" << a << endl;
    }
    return 0;
}