#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    int n;
    while (cin >> n) {
        int t = (n+38) % 39 + 1;
        cout << "3C" << (t < 10 ? "0" : "") << t << endl;
    }
    return 0;
}