#include <stdio.h>

int main(void)
{
	int candy;
	int amari;
	
	while (scanf("%d" ,&candy) != EOF){
		
		amari = candy % 39;
		
		if (candy % 39 == 0){
			printf("3C39");
		}
		
		else if ((amari >= 1) && (amari <= 9)){
			printf("3C0%d" , amari);
		}
		
		else {
			printf("3C%d" , amari);
		}
	}
	
	return (0);
}