#include<iostream>
using namespace std;
int main(){
  int candy,num;
  while(cin>>candy){
    if(candy%39!=0){
      num=candy%39;
    }if(candy%39==0){
      num=39;
    }
    if(num<10)cout<<"3C0"<<num<<endl;
    else{
    cout<<"3C"<<num<<endl;
    }
  }
  return 0;
}