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

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

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	int n;
	
	while(cin >> n)
	{
		n %= 39;
		
		cout << "3C";

		if(n == 0) cout << 39 << endl;
		else if(n < 10) cout << "0" << n << endl;
		else cout << n << endl;
	}
	return 0;
}

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

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

int main()
{
	int candy;
	while( scanf("%d", &candy) != EOF )
	{
		printf("3C%02d\n", (candy - 1) % 39 + 1);
	}
	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 n,count;
	while(cin>>n){
		count=n%39;
		if(count==0)count=39;
		cout<<"3C"<<(count/10==0)?"0"+count:count<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

  int candy;

  
  while(cin >> candy) {

    if(candy%39==0) cout << "3C39" << endl;

    else if(candy%39<10) cout << "3C0" << candy%39 << endl;

    else cout << "3C" << candy%39 << endl;

  }

  return 0;

}

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

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

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

C++: #include<stdio.h>

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