#include<iostream>

using namespace std;

int main()
{
	int ame[100],i,temp;
	
	for(i = 0;	scanf("%d",&ame[i]) != EOF;i++){
		if(ame[i] == 0){
			break;
		}
	}
	temp = i;
	for(;i > -1;i--){
		ame[i] = ame[i] % 39;
		if(ame[i] == 0){
			ame[i] = 39;
		}
	}
	for(i = 0; i < temp; i++){
	printf("3C%02d\n",ame[i]);
	}
}