#include <iostream>

using namespace std;

int main(void)
{
	int n;

	while( cin >> n ){
		int answer = n % 39;
		if( answer == 0 ) answer = 39;

		cout << "3C" << (( answer > 0 && answer < 10 ) ? "0" : "" ) << answer << endl;
	}
	return 0;
}