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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());


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

	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int n;

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

C++: #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);
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

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

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

int main(void){
	int n;

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

	return 0;
}

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

using namespace std;

int main(){

	int n;

	while(cin>>n){

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

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

	printf("3C%d?\n",n);
	}
}

C++: #include <bits/stdc++.h>
#define r(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
	int a;
	while(cin>>a){
		--a%=39;
		a++;
		cout<<3<<'c';
		if(a<10)cout<<0;
		cout<<a<<endl;
	}
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int in;
	while(cin>>in){
		in%=39;
		if(in==0)in=39;
		printf("3C%02d\n",in);
	}
}

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

int main() {
	while (1) {
		int a;
		cin >> a;
		if (cin.fail())break;
		cout << "3C" << a % 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%02d\n", i)) i = (i - 1) % 39 + 1;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <bitset>
#include <complex>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");

typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef complex<double> CD;

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

C++: #include<iostream>
using namespace std;
int main(){
  int ame;
  while(cin>> ame){
    cout<< "3C"<< ame%39<< endl;
  }
}

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

using namespace std;
 
int main() {
    int candy = 0;
       
    while (true){
    cin >> candy;
    if (candy == EOF) {
        break;
    }
     
    cout << candy % 39 << endl;
     
    }
}

C++: #include<iostream>

using namespace std;


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

	while(cin >> candy){
		while(candy > 39){
			candy = candy - 39;
		}
		cout << "3C" << candy << endl;
	}
}

C++: #include <iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
	int n;
	while(cin >> n){
		cout << "3C" << ((n-1)%39+1<10?"0":"") << (n-1)%39+1 << endl;
	}
}

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

C++: #include<iostream>
#include<stdio.h>

using namespace std;

int main(){

  int in;
  while(cin >> in){

    while(in >= 40){
      in -= 39;
    }

    cout << "3C";
    if(in < 10) cout << "0";
    printf("%d\n",in);
  }
  return 0;
}

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

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