#include <iostream>
#include <iomanip>
using namespace std;
int main() {
    int candy, no;
    while (cin >> candy) {
        no = (candy % 39 != 0) ? candy % 39 : 39;
        cout << "3C"; 
        cout << setw(2) << setfill('0') << no << endl;
    }
    return 0;
}