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 <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("%.2\d",candy);
        
    }
}

C++: #include<iostream>
#include<iomanip>
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<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
using namespace std;
 
int main(){
   int n;
   while(cin>>n){
       int ans;
       ans=n%39;
       if(ans<10) cout<<"3C0"<<ans<<endl;
       else cout<<"3C"<<ans<<endl;
   }
    return 0;
}

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 << "3C" << str << endl;  
  }
}

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

using namespace std;

int main(){

	int n;

	while(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 n;

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

	return (0);
}

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%d\n",a);
		}
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

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

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

C++: #include <cstdio>

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

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

int main() {
    int n;
    while (cin >> n) {
        int mod = n % 39;
        if (mod == 0) mod = 39;
        cout << "3C"s << setfill('0') << setw(2) << mod << 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<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
    int n;
    while(cin>>n){
        n%=39;
        printf("3C%02d\n",n);
    }
	return 0;
}

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

int n;

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
    int n;
    while(cin>>n){
        n%=39;
        if(n==0)n=39;
        printf("3C%02d\n",n);
    }
	return 0;
}

C++: #include<cstdio>
#define buf 1000
using namespace std;
void Answer(int ans);

int main(void){
	int ans,n;
	char str[buf];

	for( ;fgets(str,sizeof(str),stdin)!=NULL; ){
		sscanf(str,"%d",&n);
		ans=n%39;
		Answer(ans);
	}
	return 0;
}

void Answer(int ans){
	printf("3C");
	if(ans==0)
		printf("%d\n",ans+39);
	else if(ans<10)
		printf("0%d\n",ans);
	else 
		printf("%d\n",ans);
}

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

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

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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
    int candy, no;
    while (cin >> candy) {
        no = (candy % 39 != 0) ? candy % 39 : 39;
        cout << "3C"; 
        cout << setw(2) << setfill('0') << no << endl;
    }
    return 0;
}

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

using namespace std;

int main(){

	int n;
	int ans;

	while(scanf("%d",&n) != EOF){

		if(n % 39 < 10 && n % 39 > 0){
			cout << "3C0" << n % 39 << endl;
		}
		else if(n % 39 == 0){
			cout << "3C39" << endl;
		}
		else if(n % 39 > 10){
			cout << "3C" << n%39 << endl;
		}

	}

	return 0;
}

C++: using System;

class myclass
{
    public static void Main()
    {
        string s;
        int g,x=0;
        int[] k=new int[20];
        for (int i = 0; i < 20; i++){
            s = Console.ReadLine();
            if (s == "EOF"){
                x = i;
                break;
            }
            g = Int32.Parse(s);
            k[i] = g % 39;
        }
        for (int i = 0; i < x; i++){
            if (k[i] == 0)
            {
                Console.WriteLine("3C39");
            }
            else if (k[i] < 10)
            {
                Console.WriteLine("3C0" + k[i]);
            }
            else Console.WriteLine("3C" + k[i]);

        }
    }
}

C++: #include<cstdio>
using namespace std;
int main(void)
{
	int x[40];
	int i,j,c,cnt;
	while(scanf("%d",&c)!=EOF){
		cnt=0;
		for(i=1;i<=c;i++){
			cnt++;
			if(cnt==39){
				cnt=0;
			}
		}
		printf("3C%d\n",cnt);
	}
	return 0;
}

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

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

    return 0;
}