#include<iostream>
using namespace std;

int main(){

	int n;
	const int num = 39;

	while(cin >> n){
		n %= num;
		if(n == 0) cout << "3C39" << endl;
		else if(n < 10) cout << "3C0" << n << endl;
		else cout << "3C" << n << endl;
	}

	return 0;

}