#include <iostream>

using namespace std;

int main(int argc, char **argv)
{
	int n;
	
	while(cin >> n){
		while(n > 39){
			n -= 39;
		}
		
		if(n < 10){
			cout << "3C0" << n << endl;
		} else {
			cout << "3C" << n << endl;
		}
	}
	
	return 0;
}