#include<iostream>

using namespace std;

int main(){
	 
	int n;
	
	while( cin >> n ) {
	
	if ( n % 39 == 0)
	n = 39;
	
	else
	n %= 39;
	
	if( n < 10)
	cout << "3C0" << n << "\n";
	
	else
	cout << "3C" << n << "\n";
	
}
  	return 0;
}
