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<stdio.h>
int main(void)
{
	int a;
	scanf("%d",&a);
	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<iostream>
using namespace std;
int main(){
	int ame,num;
	while(cin>>ame){
		num=ame%39;
		if(num==0)num=39;
		if(num<10)cout<<"3C0"<<num<<endl;
		else if(num>10)cout<<"3C"<<num<<endl;
	}
	return 0;
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
    int a;
    while(scanf("%d",&a)!=EOF){
        int ans=a%39;
        if(ans==0){
            cout<<"3C39"<<endl;
        }else if(ans<10){
            cout<<"3C0"<<ans<<endl;
        }else{
            cout<<"3C"<<ans<<endl;
        }
    }
    return 0;
}

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

C++: #include<iostream>
using namespace std;
int main(){
	while(true){
		int kyandhi,hito;
		cin >> kyandhi;
		if(kyandhi == 0)break;
		hito = kyandhi % 39;
		
		if(hito == 0){
			cout << "3C" << 39 << endl;
		}
		else if(hito < 9){
			cout << "3C0" << hito << endl;
		}
		else if(hito != 0){
			cout << "3C" << hito << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <limits>
#include <cmath>
#include <cassert>

using namespace std;
using ll = long long;

const int INF = 1<<30;
const int MOD = (int)1e9 + 7;
const int MAX_N = (int)1e5 + 5;
#define debug(x) cout << #x << ": " << x << endl

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    while(cin >> n)
    {
        n %= 39;
        if(n == 0) n = 39;
        string s = to_string(n);
        if(s.size() == 1) s = '0' + s;
        cout << "3C" + s << endl;
    }
    return 0;
}

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

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

using namespace std;

int main() {
	int t;

	while (cin >> t){
		while (t / 39 != 0) {
			t = t - 39;
		}

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

		printf("3C%02d\n",t);
	}
	return 0;
}

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

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<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

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

C++: #include <cstdio>

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

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


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

C++: include <iostream>

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(void){    
    int c;
    while(cin >> c){
        int num=c % 39;
        if(num == 0) cout << "3C39" << endl;
        else if(num >= 1 && num <= 9) cout << "3C0" << c % 39 << endl;
        else cout << "3C" << c % 39 << endl;
    }
     
}

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

}

C++: #include<iostream>
#include<string>
using namespace std;
int main() {
	int a;
	while (cin >> a) {
		int b = a % 39;
		string c;
		if (b == 0) {
			cout << "3C" << 39 << endl;
			goto stop;
		}
		c = to_string(b);
		if (c.length() == 1) {
			string d = "0";
			c = (d+c);
		}
		cout << "3C" << c << endl;
	stop:;
	}
}

C++: #pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<numeric>
#include<bits/stdc++.h>
#define ll long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
#define SPEED ios::sync_with_stdio(false);cin.tie(0);cout<<fixed<<setprecision(12)
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a, int b){return a*b/(a,b);}
//priority_queue<int, vi, greater<int> > que;//æ˜‡é †

using namespace std;

const int mod=1e9+7;

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

C++: #include<stdio.h>

int main(void){
	int i,kai;

	while(scanf("%d",&i)!=EOF){
		i%=39;
		if(i==0)i=39;
		if(i>9)
			printf("3C%d\n",i);
		else
			printf("3C0%d\n",i);
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void)
{
	int n;

	while( cin >> n ){
		int answer = n % 39;
		if( answer == 0 ) answer = 39;

		cout << "3C" << (( answer > 0 && answer < 10 ) ? "0" : "" ) << answer << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
  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;
  }