#include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <iomanip>
#include <vector>
#include <queue>



using namespace std;

typedef pair<double, int> P;

int main()
{
	int n, rest;
	
	while (cin >> n)
	{
		rest = n % 39;
		if (rest == 0)
		{
			cout << "3C39" << endl;
		} else {
			printf("3C%02d\n", rest);
		}
		//cout << n % 39 << endl;
	}
	
	return 0;
}