#include<iostream>
using namespace std;
int main(){
	int n;
	while(true){
		cin >> n;
		if(n % 39 == 0){
			cout << "3C" << 39 << endl;
		}
		else if(n % 39 < 10){
			cout << "3C" << "0" << n % 39 << endl;
		}
		else{
			cout << "3C" << n % 39 << endl;
		}
	}
	return 0;
}