#include<iostream>
using namespace std;

int main(){
	int input, ans;
	while(cin >> input){
		ans = input % 39;
		cout << "3C";
		if(ans == 0) cout << "39" << endl;
		else if(0 < ans && ans <= 9) cout << "0" << ans << endl;
		else cout << ans << endl;
	}
}