Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var scanner= bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		n, _ := strconv.Atoi(scanner.Text())
		if n%39 == 0 {
			fmt.Println(fmt.Sprintf("3C%02d", 39))
			continue
		}
		fmt.Println(fmt.Sprintf("3C%02d", n%39))
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

int main()
{
	for(int i; cin >> i; printf("3C%2d\n", i)) i = (i - 1) % 39 + 1;
}

C++: #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#include<iomanip>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

int main(){
    int candy, num;
    while(cin >> candy){
        num = candy % 39;
        if(num == 0) num = 39;
        cout << "3C";
        cout << setfill('0');
        cout << setw(2) << num << endl;
    }
}

C++: #include <cstdio>

int main(){
  int N;

  while(scanf("%d" ,&N) != EOF){
    printf("3C%02d\n" ,(N % 39 ? N % 39 : 39));
  }

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

	int n;
	while(cin>>n){
		cout<<"3C"<<n%39<<endl;
	}
	
	return 0;
}

C++: #include <cstdio>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	int n;
	while(scanf("%d", &n)) {
		printf("3C%02d\n", n%39==0?39:n%39);
	}
	return 0;
}

C++: #include<stdio.h>

int main(void){
	int i,kai;

	while(scanf("%d",i)!=EOF){
		i%=39;
		if(i==0)i=39;
		printf("3C%d\n",i);
	}
	return 0;
}

C++: #include<cstdio>
#include<iostream>

using namespace std;

int main(void){

	int N;

	while(cin>>N){
		if(N%39==0) printf("3C39\n");
		else printf("3C%02d\n",N%39);
	}
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,c;
	while(scanf("%d",&c)!=EOF){
	a=c%39;
		if(a==0){
			a=39;
		}
		if(a<=9){
			printf("3C0%d\n",a);
		}
		else{
			printf("3C%d\n",a);
		}
	}
	return 0;
}

C++: #include<stdio.h>
int main(){int n;while(scanf("%d",&n)!=EOF){n%=39;if(n==0)n=39;if(n<10)printf("3C0");else printf("3C");printf("%d\n",n);}}

C++: #include <stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF){
		n=n%39;
		if(n==0)
			printf("3C39\n");
		else if(n<10)
			printf("3C0%d\n",n);
		else
			printf("3C%d\n",n);
	}
}

C++: #include <iostream>
using namespace std;

int main()
{
    int n;
    while(cin >> n){
        int a = n%39;
        if(a==0)
            a=39;
        if(a < 10)
            cout << "3C0" << a << endl;
        else
            cout << "3C" << a << endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;

int main(void){
	int n;
	while(cin >> n){
		if(cin.eof()) break;
		n%=39;
		if(n==0) n+=39;
		printf("3C%02d\n",n);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int in;
while(cin>>in){
cout<<"3C"<<etfill(’0′) << setw(2) << right<<(in-1)%39+1<<endl;
}
}

C++: #include <iostream>
#include <cstdio>
using namespace std;

int main(){
	int n;
	while(1){
		if(cin.eof()) break;
		cin >> n;
		printf("3C%02d\n",(n - 1) % 39 + 1);
	}
	return 0;
}

C++: #include<iostream>
main(){for(int n;std::cin>>n;)printf("3C%02d\n",--n%39+1);}

C++: #include <iostream>
using namespace std;

int main(){
  int n;
  while(cin >> n){
    int n2 = n % 39;
    cout << "3C";
    if(n2 < 10) cout << 0;
    cout << n2 << endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int a;
	while(cin>>a){
		a = a%39;
		if(a<10)
			cout << "3C0" << a << endl;
		else
			cout << "3C" << a << endl;
	}
}

C++: #include<stdio.h>
int main(void)
{
	int a;
	while(scanf("%d",&a)!=EOF){
		if(a%39==0) printf("3c39\n");
		else{
			if(a%39>=10) printf("3C%d",a%39);
			else printf("3C0%d",a%39);
	}
	return 0;
}

C++: #include <cstdio>
using namespace std;
int main()
{
  int n;
  while((scanf("%d",&n)) != EOF){
    n %= 39;
    if(n==0) n = 39;
    printf("3C%02d\n",n);
  }
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b;
	while(scanf("%d",&a)!=EOF) {
	while(1){
		b=a-39;
		if(a<=39) break;
	}
	printf("3C%02d\n",a);
	}
	return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>

using namespace std;

//conversion
//------------------------------------------
inline long toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
inline long toLong(string s) {long v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const double INF = 1e9;

struct edge{int to,cost;};
typedef pair<int,int> P;//firstは最短距離,secondは頂点番号


int main(){
	int x;
	while(cin>>x){
		if(x%39==0)cout<<"3C39"<<endl;
		else cout<<"3C"<<setw(2)<<setfill('0')<<x%39<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int a;
	scanf("%d",&a);
	a=a%39;
	if(a==0){
	    printf("3C39\n");
	}
	else{ 
	    printf("3C%02d\n",a);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include <vector>

using namespace std;

int main(){

	int n;

	cin>>n;

	while(n>=39){
		n=n-39;
	}

	if(n==0){
		n=39;
	}

	cout<<"3C"<<n<<endl;
}

C++: #include<iostream>

using namespace std;


int main(){
	int candy,i,j;

	while(cin >> candy){
		while(candy > 39){
			candy = candy - 39;
		}

		if(candy>9){
			cout << "3C" << candy << endl;
		}else{
			cout << "3C0" << candy << endl;
		}
	}
}