#include <cstdio>
#include <iostream>

using namespace std;

int main(void)
{
	int n;

	while (scanf("%d", &n) != EOF){
		int c = n % 39;
		if (c == 0){
			cout << "3C39" << endl;
		}
		else if (c < 10){
			cout << "3C0" << c << endl;
		}
		else {
			cout << "3C" << c << endl;
		}
	}

	return (0);
}