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 <bits/stdc++.h>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)

int main() {
	int n;
	while (cin >> n) {
		string ans = "3C";
		int num = n % 39;
		if (num == 0) num = 39;
		ans.push_back(num / 10 + '0');
		ans.push_back(num % 10 + '0');
		cout << ans << endl;
	}
	return 0;
}

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

main(){
	int n ;
	while( cin >> n ){
		if( cin.eof() ) break ;
		int ans = n%39 ;
		if( !ans ) ans = 39 ;
		
		cout << "3C" ;
		if( ans < 10 ) cout << 0 ;
		cout << ans << endl ;
	}
}

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

int main(){

  int n, x;

  while(cin>>n){

  x=n%39;

  cout << "3C";

  if (x<10){
    cout << "0" << x << endl;
  } else {
    cout << x << endl;
  }
  }
  
  return 0;
}

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

int main(){
  int n,num;

  while(cin >> n){
    num = 0;
    while(n--){
      num++;
      if(num == 40)num = 1;
    }
    cout << "3C";
    if(num < 10)cout << 0;
    cout << num << endl;
  }
}

C++: #include <iostream>

using namespace std;

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

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

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

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
  
using namespace std;
  
int main(){
  
    int num;
  
    while(scanf("%d",&num)!=EOF){
        printf("3C%02d\n",(num-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){
		while(a>39)a-=39;
		cout<<'3'<<'C';
		if(a<10)cout<<'0';
		cout<<a<<endl;
	}
}

C++: #include <cstdio>

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

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

int main(void){
  int a;
  int student;
  cout<<setfill('0')<<right;
  while(cin>>a){
    student=a%39;
    if(student==0){
      student=39;
    }
    cout<<"3C"<<setw(2)<<student<<endl;
  }
  return 0;
}

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

using namespace std;

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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	int n;
	while (cin >> n)
	{
		if (cin.eof()) break;
		cout << "3C" << setw(2) << setfill('0') << ((n%39==0)?39:n%39) << endl;
	}
}

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

int main(void)
{
	int n;
	while (cin >> n, n){
		printf("3C%02d\n", n%39==0?39:n%39);
	}
	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",a);
	}
	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define LOOP(i) while(i--)
#define PRINTALL(c) for(auto pitr=c.begin();pitr!=c.end();++pitr){cout<<*pitr;if(next(pitr,1)!=c.end())cout<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

class Data{
public:
	int first;
	double second;
	string third;
};

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);

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

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

using namespace std;

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

  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;
		cout<<endl;
	}
	return 0;
}

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

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

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

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

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

C++: #include <iostream>
using namespace std;
int main()
{
	int n;
	while (cin>>n)
		cout << "3C" << setw(2) << setfill('0') << (n%39==0?39:n%39) << endl;
	return 0;
}

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

using namespace std;

int main(){

	int n;

	while(cin>>n){

	while(n>=39){
		n=n-39;
	}

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

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


	}
}

C++: #include <iostream>

using namespace std;

int main(void){

  int n;
  while( cin >> n ){

    while(1){
      if( n <= 39 ) break;
      else n -= 39;
    }
    cout << "3C";
    if( 1 <= n && n <= 9 ) cout << "0";
    cout << n << endl;

  }
  return 0;
}

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

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

	return 0;
}

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

using namespace std;
 
 int main() {
  int n,a;
  while(cin >> n) {
    a=n % 39;
	cout << "3C";
	if (a==0) a=39;
	if (a<10) cout << '0';
	cout << a << endl;
  }
  return 0;
 }

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

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<stdio.h>
int main(void)
{
    int a,b;
	scanf(" %d",&a);
    b=a%39;
	if(b==0){
	    b=39;
	}
	printf("3C%02d\n",b);
	return 0;
}

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


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

C++: #include <iostream>

using namespace std;

int main(int argc, char **argv)
{
	int n;
	
	while(cin >> n){
		while(n > 39){
			n -= 39;
		}
		
		if(n < 10){
			cout << "3C0" << n << endl;
		} else {
			cout << "3C" << n << endl;
		}
	}
	
	return 0;
}