#include<iostream>
using namespace std;

int main(){
	int n,count;
	while(1){
		cin>>n;
		if(n==char_traits<char>::eof)break;
		count=n%39;
		if(count==0)count=39;
		cout<<"3C"<<count<<endl;
	}
	return 0;
}