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"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
string to_string_keta(const long long int l, const int keta) {
	ostringstream oss;

	oss << std::setw(keta) << std::setfill('0') << l;

	return oss.str();
}

int main() {
	int a; 
	while (cin >> a) {
		a %= 39;
		if (!a)a = 39;
		cout << "3C" << to_string_keta(a,2) << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int a;
	while(cin>>a){
		for(int i=1;i<=39;i++){
			a--;
			if(a==0){printf("3C%02d\n",i);break;
			}
			if(i==39)i=0;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#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 it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n;
  while(cin>>n){
    int out=n%39;
    if(!out)out=39;
    if(out/10==0)cout<<"3C0"<<out<<endl;
    else cout<<"3C"<<out<<endl;
  }


}

C++: #include<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){
  int n;
  while(cin>>n)
    cout<<"3C"<<(n-1)%39+1<<endl;
  return 0;
}

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

int main() {
	int a,b,c;
	while(cin >> a){
		b=a/39;
		c=a-b*39;
		cout << "3C";
		if(c==0){
			cout << "39" <<endl;
		}else if(c<10){
			cout << "0" << c <<endl;
		}else{
			cout << c << endl;
		}
	}
	return 0;
}

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;
}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		cout<<"3C";
		n%=39;
		if(n==0)cout<<39<<endl;
		else if(log10(n)>=1)cout<<n<<endl;
		else cout<<"0"<<n<<endl;
	}
	return 0;
}

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

int main(){
  int n;

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

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
int main() {
	int a; 
	while (cin >> a) {
		a %= 39;
		if (!a)a = 39;
		cout << "3C" << to_string(a) << endl;
	}
	return 0;
}

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

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

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

int main() {
  int n;
  while(cin >> n) cout << "3C" << (n % 39 < 10 && n % 39 != 0 ? "0" : "") << (!(n % 39) ? 39 : n % 39) << endl;
}

C++: #include <cstdio>
int main(){for(int x;~scanf("%d",&x);)printf("3C%02d\n",x%39?x%39:39);}

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-1)%=39;
		a++;
		cout<<3<<'c';
		if(a<10)cout<<0;
		cout<<a<<endl;
	}
}

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

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

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

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>

using namespace std;

int main(){

	int num;

	while(scanf("%d",&num)!=EOF){
		printf("3C%02d\n",(num-1)%39+1);
	}

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){
  int n;
  while(cin>>n)
    printf("3C%02d\n",(n-1)%39+1);
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int x,ama;
	
	while(1) {
		if(scanf("%d",&x)==EOF){
			break;
		}
		ama=x%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<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
    int n;
    while(cin>>n){
        n%=39;
        printf("3C%02d",n);
    }
	return 0;
}

C++: #include<stdio.h>

using namespace std;

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

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

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

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

int main()
{
  while(true)
  {
    int candy;
    cin >> candy;
    if ( cin.eof() ) break;
    cout << "3C" << candy%39 << endl;
  }
}

C++: #include <cstdio>
 
int main()
{
    int N;
    while (~scanf("%d", &N)) {
	printf("3C%02d\n", N % 39 ? N % 39 : 39);
    }
    return 0;
}

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

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

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

int main() {
  while(1) {
    int n;
    cin >> n;
    if(n == 0) break;

    int num = (n-1) % 39 + 1;
    if(num < 10) cout << "3C0" << num << endl;
    else         cout << "3C" <<  num << endl;
  }
  return 0;
}

C++: #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>

using namespace std;

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

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

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