def testcase(num, x):

    print(("Case {}: {}".format(str(num),str(x))))



cnt=0

while True:

    num = int(eval(input()))

    cnt+=1

    if num !=0:

        testcase(cnt,num)

    elif num == 0:

        break    

i = 1



while True:

    tmp = eval(input())

    if tmp == '0':

        break

    print(('Case {}: {}'.format(i, tmp)))

    i += 1

def testcase(num, x):
    print(("Case {}: {}".format(str(num), str(x))))


cnt = 0
while True:
    num = int(eval(input()))
    cnt += 1
    if num != 0:
        testcase(cnt, num)
    elif num == 0:
        break

i = 1
while True:
    tmp = eval(input())
    if tmp == "0":
        break
    print(("Case {}: {}".format(i, tmp)))
    i += 1

-def testcase(num, x): -    print(("Case {}: {}".format(str(num), str(x)))) - - -cnt = 0 +i = 1 -    num = int(eval(input())) -    cnt += 1 -    if num != 0: -        testcase(cnt, num) -    elif num == 0: +    tmp = eval(input()) +    if tmp == "0": +    print(("Case {}: {}".format(i, tmp))) +    i += 1