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

Python: try:
    while True:
        ame = int(input())
        num1 = ame % 39
        if num1 == 0:
            num1 = 39
        if num1 < 10:
            print("3C0" + str(num1))
        else:
            print("3C" + str(num1))
except EOFError as e:
    num = 0

Python: while 1:
    try:n=int(input())
    except:break
    print("3C{:02d}".format(n%39 if n%39 else 39))

Python: while True:
  try:
    n = int(input())
  except:
    break
    
  if n % 39 == 0:
    ans = 39
  else:
    ans = n % 39
    
  print("3C" + str(ans).zfill(2))

Python: while 1:
    try:
        n = int(input())
    except:
        break

    if n % 39 == 0:
        ans = 39
    else:
        ans = n % 39

    print("3C" + str(ans).zfill(2))

Python: while True:
    try: n = int(input())
    except: break
    n = n % 39
    if not n:
        print('3C39')
    else:
        print('3C{:02}'.format(n))

Python: # AOJ 0148 Candy and Class Flag
# Python3 2018.6.18 bal4u

while True:
	try: a = (int(input())-1) % 39 + 1
	except: break
	print("3C", format(a, "02d"), sep='')

Python: while True:
  try:
    print("3C", str((int(input()) - 1) % 39 + 1).zfill(2), sep="")
  except EOFError:
    break

Python: while True:
    try:
        n=int(input())
        S=(n-1)%39+1
        print("3C",format(S,"02d"),sep="")
    except:
        break

Python: while True:    
    
    try:
        n = int(input())
    except:
        break
    
    ans = n % 39
    if ans == 0:
        ans = "39"
    else:
        ans = "{0:02d}".format(ans)
    print("3C"+ans)

Python: def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())

for l in range(len(N)):
    n = int(N[l])
    print("3C", end="")
    ans = n % 39
    if ans == 0:
        print(39)
    elif ans < 10:
        print("0", end="")
        print(ans)
    else:
        print(ans)

Python: while True:
    try:
        n = int(input())
        num = n % 39
        if num == 0:
            num = 39
        if num < 10:
            num = "0" + str(num)
        print("3" + "C" + str(num))
    except EOFError:
        break

Python: while True:
  try:
    a = int(input())
  except:break
  if a%39 == 0:
        print("3C39")
  else:
    b = a // 39
    c = a - 39 * b
    if c < 10:
      print("3C0",c,sep='')
    else:
      print("3C",c,sep='')

Python: while True:
    try:
        n = int(input().strip())
        m = n % 39 
        if m==0:
            s = "39"
        else:
            s = "%02d" % m
        print("3C" + s)
    except EOFError:
        break

Python: while 1:
    try:n=int(input())
    except:break
    print("3C{:02d}".format(n%39 if n%39 else 39))

Python: while True:
    try:
        c= int(input())
    except:
        break
    c%= 39
    print("3C0"+str(c) if len(str(c))==1 and c> 0 else ("3C39" if not c else "3C"+str(c)))

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0148

"""
import sys
from sys import stdin

input = stdin.readline


def main(args):
    for line in sys.stdin:
        candy = int(line)
        hit = candy % 39
        if hit == 0:
            hit = 39
        print('3C{:02d}'.format(hit))



if __name__ == '__main__':
    main(sys.argv[1:])

Python: while True:
    try:
        a = int(input())
    except:
        break
    a = str(a%39)
    if a == "0":
        a = "39"
    elif len(a) == 1:
        a = "0"+a
    print("3C"+a)

Python: import sys

for i in sys.stdin:
    p = int(i) % 39
    if p == 0:
        print("3C39")
    elif p < 10:
        print("3C0%d" %(p))
    else:
        print("3C%d" %(p))

Python: import sys

COUNT = 39

for line in sys.stdin:

    num = int(line[:-1])

    result = num % COUNT

    if result == 0:
        result = COUNT

    print("3C%02d" % result)

Python: while True:
    try:
        a = int(input())
    except:
        break
    tmp = a - (a // 39) * 39
    print("3C{:02d}".format(tmp if tmp % 39 else 39))

Python: while True:
    try:
        num = int(input())
    except:
        break
    
    s = (num-1)%39 + 1
    print("3C{:02}".format(s))

Python: while True:
  try:
    print("3C",str((int(input())-1)%39+1).zfill(2),sep="")
  except EOFError:
    break

Python: while True:
    try:
        n=int(input())
        S=(n-1)%39+1
        print("3C",format(S,"02d"),sep="")
    except:
        break

Python: while True:
    try:
        a = int(input())
    except:
        break
    tmp = a - (a // 39) * 39
    print("3C{:02d}".format(39 if tmp == 39 else tmp))

C++: #include<stdio.h>

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

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

typedef int Weight;
struct Edge {
  int src, dst;
  Weight weight;
  Edge(int src, int dst, Weight weight) :
    src(src), dst(dst), weight(weight) { }
};
bool operator < (const Edge &e, const Edge &f) {
  return e.weight != f.weight ? e.weight < f.weight :
    e.src != f.src ? e.src < f.src : e.dst < f.dst;
}
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

struct UnionFind {
  vector<int> data;
  UnionFind(int size) : data(size, -1) { }
  bool unionSet(int x, int y) {
    x = root(x); y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y]; data[y] = x;
    }
    return x != y;
  }
  bool findSet(int x, int y) {
    return root(x) == root(y);
  }
  int root(int x) {
    return data[x] < 0 ? x : data[x] = root(data[x]);
  }
  int size(int x) {
    return -data[root(x)];
  }
};

Weight kruskal(Edges es, int v) {
  UnionFind uf(v);
  sort(ALL(es));
  Weight total = 0;
  FOR(e, es)
    if (uf.unionSet((*e).src, (*e).dst))
      total += (*e).weight;
  return total;
}

int main() {

}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int main(void){
	int n;
	while(scanf("%d",&n)!=EOF){
		if(n%39==0)cout<<"3C39"<<endl;
		else printf("3C%02d\n",n%39);
	}
	return 0;
}

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

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

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

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

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

int main(){
	int n,count;
	while(1){
		cin>>n;
		if(n==char_traits<char>::eof)break;
		count=n%39;
		if(count==0)count=39;
		cout<<"3C"<<count<<endl;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <iterator>
 
using namespace std;
 
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
 
#define FOR(i,n) for(int i = 0; i < (n); i++)
#define sz(c) ((int)c.size())

typedef unsigned long long ull;
const int INF = (int)1e8;


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