#include <cstdio>
using namespace std;

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