#include<iostream>

using namespace std;

int main(){
	int a;
	while(true){
		cin >> a;
		if(!a)
			return 0;
		a = a%39;
		if(a<10)
			cout << "3C0" << a << endl;
		else
			cout << "3C0" << a << endl;
	}
}