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 <bits/stdc++.h> // only for GCC
using namespace std;

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

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

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#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())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1};
int dy[8] = {0, -1, 0, 1, -1, 1, -1, 1};

int main() {
  int n;

  while(cin >> n) {
    int ans = n%39;
    if(ans == 0) ans = 39;
    string str = "3C";

    str += (ans/10) + '0';
    str += (ans%10) + '0';
    cout << str << endl;  
  }
}

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

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

C++: #include<iostream>

using namespace std;

int main()
{
	int ame;
	
	cin >> ame;
	ame = ame % 39;
	printf("3C%02d\n",ame);
}

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

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

int main()
{
	int n;
	while( std::cin >> n )
		std::cout << "3C" << std::setw( 2 ) << std::setfill( '0' ) << ( n % 39 ? n % 39 : 39 ) << std::endl;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	while(cin >> n){
		while(n > 39){
			n -= 39;
		}
		if(n >= 10){
			printf("3C%d\n", n);
		}else{
			printf("3C0%d\n", n);
		}

	}
}

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

int solve(int n) {
    int a = n % 39;
    if (a == 0) a += 39;
    return a;
}

int main() {
    int n;
    while (cin >> n) {
        printf("3C%02d\n", solve(n));
    }
    return 0;
}

C++: #include<iostream>
int main(){
 while(!std::cin.eof()){
 int in;  
 std::cin >> in;
 if(!(in%=39)) in =39;
 std::printf("3C%02d\n",in);
 }
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int S = 39;

int main() {
  int N;
  while(cin >>N) printf("3C%02d\n", (N % S == 0 ? S : N % S));
  return 0;
}

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<list>
#include<stack>
#include<queue>
#include<cctype>
#include<iomanip>
#include<functional>
#include<numeric>
#include<map>
#include<set>
#include<complex>
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
	int n;
	while (cin >> n) {
		while (n > 39) {
			n -= 39;
		}
		cout << "3C";
		printf("%.2d\n", n);
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;

static const double eps = 10e-6;

int main(){
	int n;
	while(~scanf("%d",&n)){
		printf("3C%02d\n",n%39 == 0 ? 39 : n%39);
	}
}

C++: #include<iostream>
int main(){
 while(!std::cin.eof()){
 int in;  
std::cin >> in;
std::cout << "3C" << 1+(in%39)<<std::endl; 
 }
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.dat", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		int num = 0;
		stringstream ss(str);
		ss >> num;
		num %= 39;
		if (num == 0){
			num = 39;
		} // end if
		if (num < 10){
			cout << "3C0" << num << endl;
		}else{
			cout << "3C" << num << endl;
		} // end if
	} // end loop
		
	return 0;
}

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

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

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


int main(int argc, const char * argv[]) {
    
    int n;
    while (cin >> n) {
        
        cout << "3C" << n % 39 << endl;
        
    }
    
    return 0;
}

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

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

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

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

int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    printf("3C%02d\n", (n-1)%39+1);
  }
  return 0;
}

C++: int main(){
 while(!std::cin.eof()){
 int in;  
std::cin >> in;
std::cout << "3C" << 1+(in%39)<<std::endl; 
 }
}

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

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