#include <iostream>
#include <cstdlib>

using namespace std;

int main() {
  int n;
  while( cin >> n ) {
    int id = n % 39;
    id = ( id == 0 ? 39 : id );
    cout << "3C" << ( id < 10 ? "0" : "" ) << id  << endl;
  }
  return EXIT_SUCCESS;
}