#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		cout<<"3C";
		n%=39;
		if(n==0)cout<<39<<endl;
		else if(log10(n)>=1)cout<<n<<endl;
		else cout<<"0"<<n<<endl;
	}
	return 0;
}