#include <stdio.h>

int main(void)
{
	int can;
	
	while (scanf("%d", &can) != EOF){
			if (1 <= can && can <= 10000){
				if ( can %  39 < 10){
					printf("3C0%d\n", can % 39);
				}
				else {
					printf("3C%d\n", can % 39);
				}
			}
	}
	
	return (0);
}