#include <cstdio>

int main()
{
	int a = 0;
	int n = 0;
	while (scanf("%d", &a) != EOF) {

		n = a % 39;
		if (n == 0) {
			n = 39;
		}
 
		if (n < 10) {
			printf("3C0%d\n", n);
		}
		else {
			printf("3C%d\n", n);
		}
	}
    return 0;
}