#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		if (cin.eof()) break;
		cout << "3C" << setw(2) << setfill('0') << ((n%39==0)?39:n%39) << endl;
	}
}