#include<iostream>
using namespace std;
int main(){
	int ame,num;
	while(cin>>ame){
		num=ame%39;
		if(num==0)num=39;
		if(num<10)cout<<"3C0"<<num<<endl;
		else if(num>10)cout<<"3C"<<num<<endl;
	}
	return 0;
}