#include <iostream>
using namespace std;

int main() {
  int n;
  while(cin >> n) {
    n %= 39 ;
    if(n == 0) cout << "3C39" << endl;
    else if(1<=n && n<=9)cout << "3C0" << n << endl;
    else cout << "3C" << n << endl;
  }
}