#include<iostream>
#include<string>
using namespace std;
int main() {
	int a;
	while (cin >> a) {
		int b = a % 39;
		string c;
		if (b == 0) {
			cout << "3C" << 39 << endl;
			goto stop;
		}
		c = to_string(b);
		if (c.length() == 1) {
			string d = "0";
			c = (d+c);
		}
		cout << "3C" << c << endl;
	stop:;
	}
}