#include <bits/stdc++.h>
using namespace std;

#define int long long

signed main() {
    int n;
    while(cin>>n) {
        if(n%39==0) cout << "3C39" << endl;
        else cout << "3C" << setfill('0') << setw(2) << n%39 << endl;
    }
    return 0;
}