#include<iostream>
#include<cstdio>
#include <cstring>
#include<map>
#include<string>
#include<stack>
#include <algorithm>
#include <sstream>
#include<vector>
#include<map>
#include<cmath>
using namespace std;

int StringToInt(string str)
{
            stringstream ss(str);
             int i;
             ss >> hex >> i;
             return i;
}


int main(){
	int n;
	while(cin>>n)
	{
	n=n%39;
	if(n==0)puts("3C39");
	else if(0<=n &&n<=9) cout<<"3C0"<<n<<endl;
	else cout<<"3C"<<n<<endl;
	}

	return 0;
}