#include <iostream>
using namespace std;
int main(void){
    int a;
     while (1){if (cin >>a){
         if(a%39==0) cout <<"3C39" <<endl;
         else if (a%39<10) cout <<"3C0"<<a%39<<endl;
         else cout <<"3C"<<a%39<<endl;
     } 
         
         else break;
         
         }

}
