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(void){
    int a;
     while (1){if (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;
     } 
         
         else break;
         
         }

}

C++: #include <iostream>
#include <stdio.h>
#include <cmath>
#include <algorithm>
using namespace std;
int main(void){
    int num;
    while(scanf("%d",&num)!=EOF){
        printf("3C%02d\n",(num-1)%39+1);
    }
    return 0;
}

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

C++: #include<iostream>
#include<string>
#include<stdio.h>
#include<cstdio>
#include<math.h>
using namespace std;
int main(){
    int a,o;
    while(cin>>a){
        o=a%39;
        if(o==0){
            cout<<"3c39"<<endl;
        }
        else{
        cout<<"3c";
            printf("%02d",o);
            cout<<endl;
        }
    }
    return 0;
}

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

int main(){

  int n;

  while(cin >> n){
    int m = 0;

    for(int i=0;i<n;i++){
      m++;
      if(m == 40) m = 1;
    }

    printf("3C%02d\n",m);

  }
}

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

C++: #include <cstdio>

int main()
{
	int a = 0;
	int n = 0;
	while (scanf("%d", &a) != EOF) {

		n = a % 39;
		if (n == 0) {
			n = 39;
		}
 
		if (n < 10) {
			printf("3C0%d\n", n);
		}
		else {
			printf("3C%d\n", n);
		}
	}
    return 0;
}

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;
int main()
{
???int n;
???cout.fill('0');
???while(cin>>n){
??????if(n%39==0)cout<<"3C39"<<endl;
??????else cout<<"3C"<<setw(2)<<n%39<<endl;
???}
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

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

C++: // Tazoe

#include <iostream>
using namespace std;

int main()
{
while(true){
	int n;
	cin >> n;
if(cin.eof())
break;
	int m = n%39;

	if(m==0){
		cout << "3C39" << '\n';
	}
	else if(m>=1&&m<=9){
		cout << "3C0" << m << '\n';
	}
	else{
		cout << "3C" << m << '\n';
	}
}
	return 0;
}

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

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

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

int n;

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

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

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#define REP(i, n) for(int i = 0;i < n;i++)
#define ll long long
#define INF 114514
using namespace std;




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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;

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

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

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

    return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  
  int a;
  while(cin >> a){
    cout << "3C";
    while(a > 39) a -= 39;
    if(a < 10) cout << 0;
    cout << a << endl;
  }
  return (0);
}

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

C++: #include <cstdio>

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

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