#include <iostream>
using namespace std;

int main() {
  int n;
  while(cin >> n) {
    int num = (n-1) % 39 + 1;
    if(num < 10) cout << "3C0" << num << endl;
    else         cout << "3C" <<  num << endl;
  }
  return 0;
}