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>
#include<cstdio>

using namespace std;

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

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

C++: #include <iostream>
#include <vector>
#include <map>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>
using namespace std;

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define repp(i,k,n) for(int i=k;i<(int)n;i++)
#define rei(n) for(int i=0;i<(int)n;i++)
#define rel(n) for(int l=0;l<(int)n;l++)
#define al(s) s.begin(),s.end()

typedef pair<int, int> pi;
typedef pair<pi, pi> ppi;
typedef pair<int, ppi> pipp;


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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int x;
  while(cin>> x){
    if(x%39==0) printf("3C%2d\n",39);
    else printf("3C%02d\n",x%39);
  }
}

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

using namespace std;

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

C++: #include<iostream>
#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 x;
  while(cin >> x) {
    x%=39;
    if(x==0) x=39;
    if(x<10) cout << "3C0" << x << endl;
    else cout << "3C" << x << endl;
  }
  return 0;
}

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

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

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

C++: 
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

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

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

int main(){

  int n;

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

  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<iostream>
using namespace std;

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

	return 0;
}

C++: #include <iostream>
using namespace std;
int main (void){


  int n ,a;


  

  while( 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<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 <iostream>
#include <cstdio>
using namespace std;
int main(void) {
  int candy, count;

  while(scanf("%d", &candy) != EOF) {
    count = 0;
    while(candy != 0) {
      candy--;
      count++;
      if(count == 39) count = 0;
    }
    if(count == 0) cout << "3C39" << endl;
    else if(count < 10) cout << "3C0" << count << endl;
    else cout << "3C" << count << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main (void){


  int n ,a;


  while(1){
  

  cin >> n ;

  if ( n == 0) break;


  a = n % 39;


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


  return 0;
}

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

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

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

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

using namespace std;

int main(){

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

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

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

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

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

int main(void){
	int x;

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

	return 0;
}