#include<iostream>
using namespace std;
int main() {
	int x;
	while (cin >> x) {
		x %= 39;
		if (x == 0)cout << "3C39";
		else if (x < 10)cout << "3C0" << x;
		else cout << "3C" << x;
		cout << endl;
	}
}