#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cout.fill('0');
    while(cin>>n){
        if(n%39==0)cout<<"3C39"<<endl;
        else cout<<"3C"<<setw(2)<<n%39<<endl;
    }
}