fun main(args:Array<String>):Unit {
    while(true){
        val n = readLine()?.trim()?.toInt() ?: return
        println("3C" + if (n % 39 > 10) n % 39 else if (n % 39 == 0) "39" else "0" + n % 39)
    }
}
