#include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#include<iomanip>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

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