#include<iostream>
using namespace std;

int main() {
	while (1) {
		int a;
		cin >> a;
		if (cin.fail())break;
		cout << "3C";
		if (a % 39 == 0) { cout << 39; continue; }
		cout.width(2);
		cout.fill('0');
		cout << a % 39 << endl;
	}
}