#include <iostream>
using namespace std;

int main(){
  int i,n;
  while(cin >> n){
    while(n > 39){
      n -= 39;
    }

    if(n < 10) cout << "3C0" << n << endl;
    else cout << "3C" << n << endl;
  }
}