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<cstdio>
using namespace std;
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        printf("3C%02d\n",(n%39==0) ? 39: n%39);
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int ame[100],i,temp;
	
	for(i = 0;;i++){
		cin >> ame[i];
		if(ame[i] == 0){
			break;
		}
	}
	temp = i;
	for(;i > -1;i--){
		ame[i] = ame[i] % 39;
		if(ame[i] == 0){
			ame[i] = 39;
		}
	}
	for(i = 0; i < temp; i++){
	printf("3C%02d\n",ame[i]);
	}
}

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

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

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



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

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

int main()
{
    int n;

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

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int a;
  while (cin >> a) {
    cout << "3C" << setfill('0') << setw(2) << (a % 39 == 0 ? 39 : a % 39) << endl;
  }

  return 0;
}

C++: #include<iostream>
int main(){
 while(!std::cin.eof()){
 int in;  
std::cin >> in;
std::cout << "3C" << ((!(in%39))?39:in%39) <<std::endl; 
 }
}

C++: #include <iostream>

using namespace std;

int main() {
int candy = 0;
    int member = 0, it = 1;
    
    while (true){
    cin >> candy;
    if (candy == EOF) {
        break;
    }
    
    cout << candy % 39 << endl;
    
    }
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int n;
        if(!(cin >> n))
            return 0;

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

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

int main()
{
	int a;
	while (std::cin >> a) {
		if (a%39 != 0) std::cout << "3C" << std::setw(2) << std::setfill('0') << a%39 << std::endl;
		else std::cout << "3C39" << std::endl;
	}
	return 0;
}

C++: #include <cstdio>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
int main() {
	int n;
	while(scanf("%d", &n) != EOF) {
		printf("3C%02d\n", n%39==0?39:n%39);
	}
	return 0;
}

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

C++: #include<iostream>

using namespace std;

int main()
{
	int ame[100],i,temp;
	
	for(i = 0;	scanf("%d",&ame[i]) != EOF;i++){
		if(ame[i] == 0){
			break;
		}
	}
	temp = i;
	for(;i > -1;i--){
		ame[i] = ame[i] % 39;
		if(ame[i] == 0){
			ame[i] = 39;
		}
	}
	for(i = 0; i < temp; i++){
	printf("3C%02d\n",ame[i]);
	}
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
  int s;
  string n[41]={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39"};
  while(cin>>s){
    while(s>39) s -= 39;
    cout << "3C" << n[s] << endl;
  }
  return 0;
}

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

int main() {
    int n;
    while (cin >> n) {
        int t = (n+38) % 39 + 1;
        cout << "3C" << (t < 10 ? "0" : "") << t << endl;
    }
    return 0;
}

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

C++: #include <iostream>

using namespace std;

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

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

using namespace std;

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

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

const int N = 39;

string solve(int n){
  n = n %N;
  if(n==0)n = N;
  return "3C" + (n<10?"0"+to_string(n):to_string(n));
}

int main(){
  int n;
  while(cin>>n){
    cout<<solve(n)<<endl;
  };
  
}

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<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
#include<cstdio>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

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

    return 0;
}

C++: /*
	0148:Candy and Class Flag
*/
#include	<iostream>
#include	<cstdio>

using namespace std;

int main(void) {
	while(1) {
		int i, r;
		
		cin >> i;
		if( cin.eof() ) { break; }
		
		printf("3C%02d\n", (i - 1) % 39 + 1);
	}
	
	return 0;
}

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

main(){
  int i,n;
  while(cin >> n){
    while(n > 39){
      n -= 39;
    }

    if(n < 10) cout << "3C0" << n << endl;
    else cout << "3C" << n << endl;
  }
}

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

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

C++: #include <stdio.h>

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

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

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

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>
using namespace std;
int main (void){


  int n ,a;


  

  cin >> n ;




  a = n % 39;


    if(  a > 0   &&  a < 10) cout << "3C0"  <<  a  <<endl;
    else if( a >= 10 ) cout << "3C"  <<  a  <<endl;
    else if( a == 0) cout << "3C39"  <<endl;



  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/10==0)?cout<<"0"<<count:cout<<count<<endl;
	}
	return 0;
}