#include <iostream>
using namespace std;
int main(void){    
    int c;
    while(cin >> c){
        int num=c % 39;
        if(num == 0) cout << "3C39" << endl;
        else if(num >= 1 && num <= 9) cout << "3C0" << c % 39 << endl;
        else cout << "3C" << c % 39 << endl;
    }
     
}

