// 2011/01/31 Tazoe

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
using namespace std;

int main()
{
	while(!cin.eof()){
		string str;
		getline(cin, str);
		if(str.empty())
			continue;

		istringstream ist(str);
		int n;
		ist >> n;

		int num = n%39;
		if(num==0)
			num = 39;

		cout << "3C" << setw(2) << setfill('0') << num << endl;
	}

	return 0;
}