#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
    int a;
    while (cin >> a) {
        int t = a % 39;
        if (t == 0) t = 39;
        cout << "3C";
        if (t < 10) cout << 0;
        cout << t << endl;
    }
}
