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

int main()
{	
	int n;

	while (cin >> n) {
		if (n % 39 == 0)
			n = 39;
		else
			n = n % 39;

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

	return 0;
}

