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