#include<bits/stdc++.h>
using namespace std;
int main(void)
{
	int i,j,k,n;
	while(scanf("%d",&n)!=EOF) {
		if(n%39==0) cout<<"3C39"<<endl;
		else if(n%39<10)cout<<"3C0"<<n%39<<endl;
		else cout<<"3C"<<n%39<<endl;
	}
}