#include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
#include<map>
#include<vector>
#define int long long
using namespace std;
int test[51];
signed main() {
    int n;
    while (cin >> n) {
        cout << "3C";
        if (n % 39 == 0) {
            cout << 39 << endl;
        }
        else if (n % 39 <= 9) {
            cout << 0 << n % 39 << endl;
        }
        else {
            cout << n % 39 << endl;
        }
    }
}
