#include<iostream>
using namespace std;

int main() {
	int s[20];
	int a;
	for (int i = 0; i < 20; i++){
		cin >> a;
		s[i] = a % 39;
	}
	for (int i = 0; i < 20; i++){
		if (s[i] == 0) {
			cout << "3C39";
		}
		else cout << "3C" << s[i];
		cout << endl;
	}
}