#include<iostream>
#include<string>
#include<stdio.h>
#include<cstdio>
#include<math.h>
using namespace std;
int main(){
    int a,o;
    while(cin>>a){
        o=a%39;
        if(o==0){
            cout<<"3C39"<<endl;
        }
        else{
        cout<<"3C";
            printf("%02d",o);
            cout<<endl;
        }
    }
    return 0;
}