#include<bits/stdc++.h>
using namespace std;
int main(void){
    int a;
    while(scanf("%d",&a)!=EOF){
        int ans=a%39;
        if(ans==0){
            cout<<"3C39"<<endl;
        }else if(ans<10){
            cout<<"3C0"<<ans<<endl;
        }else{
            cout<<"3C"<<ans<<endl;
        }
    }
    return 0;
}
