#include <iostream>

using namespace std;

int main()
{
	int n;
	
	while (cin >> n){
		int snum = n % 39;
		
		cout << "3C";
		if (snum == 0){
			snum = 39;
		}
		else if (snum < 10){
			cout << '0';
		}
		cout << snum << endl;
	}
	return (0);
}