while True:

    try:

        c= int(eval(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))))
while True:

    try:

        a = int(eval(input()))

    except:

        break

    tmp = a - (a // 39) * 39

    print(("3C{:02d}".format(tmp if tmp % 39 else 39)))
while True:
    try:
        c = int(eval(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))
        )
    )

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

-        c = int(eval(input())) +        a = int(eval(input())) -    c %= 39 -    print( -        ( -            "3C0" + str(c) -            if len(str(c)) == 1 and c > 0 -            else ("3C39" if not c else "3C" + str(c)) -        ) -    ) +    tmp = a - (a // 39) * 39 +    print(("3C{:02d}".format(tmp if tmp % 39 else 39)))