#include <iostream>
using namespace std;

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