
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

int main(void){
  long long int cam;
  while(cin>>cam){
    
    if(cam%39==0){
      cout<<"3C39";
    }else{
      cout<<"3C";
      if(cam%39<=10)
	cout<<"0"<<cam%39;
      else 
	cout<<cam%39;
    }    
    cout<<endl;
  }
}