#include <iostream>
#include <vector>
#include <algorithm>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	int n;
	
	while(cin >> n)
	{
		n %= 39;
		
		cout << "3C";

		if(n == 0) cout << 39 << endl;
		else if(n < 10) cout << "0" << n << endl;
		else cout << n << endl;
	}
	return 0;
}