#include<iostream>
using namespace std;
int main(){
    int n;
    while(cin >>n){
        if(n%39 ==0) cout << "3C39"<<endl;
        else if(n%39 <10) cout << "3C0" << n%39<<endl;
        else cout << "3C" << n%39<<endl; 
    }
}
