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

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

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

int main(){

	int n;
	const int num = 39;

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

	return 0;

}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

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

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int n;

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
    while(1){
        int n;
        cin>>n;
        n%=39;
        printf("3C%02d",n);
    }
	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
			cout << "3C0" << a << endl;
	}
}

C++: #include <cstdio>

int main(){
  int N;
  while(~scanf("%d" ,&N)){
    printf("3C%02d\n" ,N % 39 ? N % 39 : 39);
  }

  return 0;
}

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

int main(){
	
	int c;
	while(cin>>c){
		if(c!=EOF){
		int s=c%n;
	if(s==0)
		cout<<"3C39"<<endl;
	else if(s<=9)
		cout<<"3C0"<<s<<endl;
	else if(s<=38)
		cout<<"3C"<<s<<endl;
	
		}
	else
		break;
	}
	
	
	
}

C++: #include <iostream>

using namespace std;

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

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

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;
	}

	printf("3C%d",n);
	}
}

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int a;
	while(cin>>a){
		for(int i=1;i<=39;i++){
			a--;
			if(a==0){printf("3C%02d",i);break;
			}
			if(i==39)i=0;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;

static const double eps = 10e-6;

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

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int n;

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	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<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

signed main() {
	for (int a; cin >> a;) {
		cout << "3C" << setfill('0') << setw(2) << (a - 1) % 39 + 1 << 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 <iomanip>

using namespace std;

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

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 <bits/stdc++.h>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

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

C++: #include <cstdio>

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