#include <stdio.h>
int main(){
    int i,k,ame;
    while(scanf("%d",&ame)!=EOF){
        ame=ame%39;
        if(ame==0){
            puts("3C39");
        }else{
        if(ame<10){
            printf("3C0%d\n",ame);
        }else{
            printf("3C%d\n",ame);
        }
        }
    }
    return 0;
}