#include <iostream>
#include <stdio.h>

using namespace std;

int main(){

	int n;
	int ans;

	while(scanf("%d",&n) != EOF){

		if(n % 39 < 10 && n % 39 > 0){
			cout << "3C0" << n % 39 << endl;
		}
		else if(n % 39 == 0){
			cout << "3C39" << endl;
		}
		else if(n % 39 > 10){
			cout << "3C" << n%39 << endl;
		}

	}

	return 0;
}