#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
#include<cstdio>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

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

    return 0;
}