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