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>
using namespace std;
int main(){
	int a;
	while(cin>>a){
		a = a%39;
		if(a==0)
			cout << "3C39" << endl;
		else if(a<10)
			cout << "3C0" << a << endl;
		else
			cout << "3C" << a << endl;
	}
}

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

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

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

using namespace std;

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

C++: #include<stdio.h>
int main(void)
{
	int a;
	while(scanf("%d",&a)!=EOF) {
		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<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

int n;

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

  return 0;
}

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

using namespace std;

int main(void)
{
	int n;

	while (scanf("%d", &n) != EOF){
		int c = n % 39;
		if (c == 0){
			cout << "3C39" << endl;
		}
		else if (c < 10){
			cout << "3C0" << c << endl;
		}
		else {
			cout << "3C" << c << endl;
		}
	}

	return (0);
}

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

int main(void){
	int n;
	
	while(cin>>n){
		while(true){
			
			if(1<=n && n<=HITO){
				int i;
				for(i=0;n>0;i++){
					n--;
				}
				printf("C1%02d\n",i);
				break;
			}			
			else if(n>HITO){
				
				n=n%HITO;
			
				if(n!=0){
					printf("3C%02d\n",n);
					break;
				}
				else if(n==0){
					cout<<"3C39"<<endl;
					break;
				}
			}
		}
	}
	return 0;
}

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

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

C++: #include <cstdio>

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

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

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

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> VI;
typedef pair<int,int> PII;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(a)  (a).begin(),(a).end()
#define PB push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

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

C++: #include <iostream>

using namespace std;

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

int main()
{
	solve();
	return(0);
}

C++: #include<iostream>
int main(){
 while(!std::cin.eof()){
 int in;  
 std::cin >> in;
 if(!in%=39) in =39;
 std::printf("3C%02d\n",in);
 }
}

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

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int n;
int main(){
	while(cin>>n){
		int pos =n%39;
		printf("3C%02d\n",pos==0?39:pos);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a;  i ++)
int main(void){
  int n;
  while(cin>>n){
    n = n % 39;
    if(!n)n = 39;
    if(n>=10)
      cout<<"3C"<<n<<endl;
    else
      cout<<"3C0"<<n<<endl;
  }
}

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 <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define INF 1000000000
#define rep(i,a,b) for (int i=(a);i<(b);i++)
#define rev(i,a,b) for (int i=(a)-1;i>=b;i--)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef queue<int> qi;
typedef vector<int> vi;
typedef vector<string> vs;
int dx[4] = { 0, 1, 0, -1 };
int dy[4] = { 1, 0, -1, 0 };

int main() {

  int in;
  while(cin >> in) {
    int num = in % 39;
    if (num == 0) num = 39;

    cout << "3C";
    if (num < 10) cout << '0';
    cout << num << endl;
  }
	return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

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

C++: #include <stdio.h>

#define N 39

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