#include <bits/stdc++.h>

using namespace std;


int main(void) {
	int n;

	while (cin >> n) {
		n = n % 39 == 0 ? 39 : n % 39;
		cout << "3C" << setw(2) << setfill('0') << n << endl;
	}

	return 0;
}
