#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
using namespace std;
int inf = 1000000000;

int main(void) {

  int a;
  while(cin >> a){
    a %= 39;
    if( a == 0 ) cout << "3C39" << endl;
    else cout << "3C" << (a < 10 ? "0":"") << a << endl;
  }


  return 0;
}

// EOF