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