#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main() {
	int n,ans;
	
	while(cin>>n){
		
		ans=n%39;
		
		if(ans==0)ans=39;
		
		if(ans/10==0){
			cout<<"3C0"<<ans<<endl;
		}else{
		cout<<"3C"<<ans<<endl;
		}
	}
	return 0;
}