// Tazoe

#include <iostream>
using namespace std;

int main()
{
while(true){
	int n;
	cin >> n;
if(cin.eof())
break;
	int m = n%39;

	if(m==0){
		cout << "3C39" << '\n';
	}
	else if(m>=1&&m<=9){
		cout << "3C0" << m << '\n';
	}
	else{
		cout << "3C" << m << '\n';
	}
}
	return 0;
}