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

