#include<iostream>
using namespace std;

int main() {
	int a;
	while (cin >> a) {
		int b = (a % 39);
		if (b == 0) { b = 39; }
		cout << "3C";
		if (1 <= b&&b <= 9) { cout << "0"; }
		cout << b << endl;
	}
	return 0;
}