#include <iomanip>
#include <iostream>
using namespace std;

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