#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
int main() {
    int c, last;
    while (scanf("%d", &c) != EOF) {
        last = (c <= 39) ? c : c % 39;
        if (last == 0) last = 39;
        printf("3C%.2d\n", last);
    }
    return 0;
}

