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 <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,s,e) for(int i=(s); i<(e); i++)
#define pb(n) push_back((n))
#define mp(n,m) make_pair((n),(m))
#define all(r) r.begin(),r.end()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;




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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

const int num = 39;

int main()
{
    int inp, cal;

    while (cin >> inp) {
        cal = inp % num;
        if (cal == 0)
            cal = num;

        cout << "3C";
        if (cal / 10 == 0)
            cout << "0";
        cout << cal << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	int a;
	while(cin>>a){
		for(int i=1;i<=39;i++){
			a--;
			if(a==0){cout<<"3C"<<i<<endl;break;
			}
			if(i==39)i=0;
		}
	}
	return 0;
}

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

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

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <ctime>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <numeric>
#include <cassert>
using namespace std;
static const double EPS = 1e-10;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define all(a) a.begin(),a.end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SS stringstream
#define DBG1(a) rep(_X,sz(a)){printf("%d ",a[_X]);}puts("");
#define DBG2(a) rep(_X,sz(a)){rep(_Y,sz(a[_X]))printf("%d ",a[_X][_Y]);puts("");}
#define bitcount(b) __builtin_popcount(b)
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)

#define delete(a,n) a.erase(remove(all(a),n),a.end())
template<typename T, typename S> vector<T>& operator<<(vector<T>& a, S b) { a.push_back(b); return a; }
template<typename T> void operator>>(vector<T>& a, int b) {while(b--)if(!a.empty())a.pop_back();}
bool isprime(int n){ if(n<2)return false;  for(int i=2;i*i<=n;i++)if(n%i==0)return false;  return true;} 
ll b_pow(ll x,ll n){return n ? b_pow(x*x,n/2)*(n%2?x:1) : 1ll;}
string itos(int n){stringstream ss;ss << n;return ss.str();}


int main(){
	ios_base::sync_with_stdio(false);
	int n;
	while(cin >> n){
		n--;
		printf("3C%02d\n",n%39+1);
	}
}

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

int main()
{
	int n;
	while( cin >> n ){
		cout << "3C" << setw( 2 ) << setfill( '0' ) << ( n - 1 ) % 39 + 1 << endl;
	}
}

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

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)
#define all(c) (c).begin(), (c).end()
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

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

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 <iostream>
using namespace std;
int main(void)
{
	int n;
	while(cin>>n){
		cout << "3C";
		printf("%2d\n",n%39?n%39:39);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a;
 
    while(cin >> a){
        if(a % 39 == 0){
            cout << "3C39" << endl;
        }
        else{
            if(a % 39 < 10){
                cout << "3C0" << a % 39 << endl;
            }
            else{
                cout << "3C" << a % 39 << endl;
            }
        }
    }
}

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

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>
#include <time.h>

#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)
#define COUNTER int i= 0,j = 0,k = 0,l = 0,m = 0, n= 0;
#define RETURN cout << endl;
/*vector<vector<int>>ArrayName = vector<vector<int>>(sizeofx, vector<int>(sizeofy, 0));*/
using namespace std;

int main ()
{
    int candy;
    COUNTER
    while(cin >>candy )
    {
        while(true)
        {
            if(candy <= 39)
                break;
            candy = candy -39;
        
        }
        cout << "3C";printf("%.2d\n",candy);
        
    }
}

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

int main(){
	int input, ans;
	while(cin >> input){
		ans = input % 39;
		cout << "3C";
		if(ans == 0) cout << "39" << endl;
		else if(0 < ans && ans <= 9) cout << "0" << ans << endl;
		else cout << ans << endl;
	}
}

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

int main(){

  int n, x;

  while(cin >> n){

  x=n%39;

  cout << "3C";

  if (x<10){
    cout << "0" << x << endl;
  } else {
    cout << x << endl;
  }
  }
  
  return 0;
}

C++: #include<stdio.h>
int main(){
	int a;
	while(~scanf("%d",&a)){
		printf("3C%02d\n",a%39);
	}
}

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

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<eps)
int main()
{
	int n;
	while(cin >> n)
	{
		n%=39;
		if(n==0)n+=39;
		if(n>=10)printf("3C%d\n",n);
		else printf("3C0%d\n",n);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

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

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