#include <cstdio>
using namespace std;

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