#include<iostream>
#define n 39
using namespace std;

int main(){
	
	int c;
	while(cin>>c){
		if(c!=EOF){
		int s=c%n;
	if(s==0)
		cout<<"3C39"<<endl;
	else if(s<=9)
		cout<<"3C0"<<s<<endl;
	else if(s<=38)
		cout<<"3C"<<s<<endl;
	
		}
	else
		break;
	}
	
	
	
}