#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.dat", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		int num = 0;
		stringstream ss(str);
		ss >> num;
		num %= 39;
		if (num == 0){
			num = 39;
		} // end if
		if (num < 10){
			cout << "3C0" << num << endl;
		}else{
			cout << "3C" << num << endl;
		} // end if
	} // end loop
		
	return 0;
}