i = 0

while 1:

    i+=1

    v = input()

    if v == '0':

       break

    print(('Case {}: {}'.format(i,v)))
i = 0

while 1:

    i+=1

    x = input()

    if x == '0':

       break

    print(('Case {}: {}'.format(i,x)))
i = 0
while 1:
    i += 1
    v = input()
    if v == "0":
        break
    print(("Case {}: {}".format(i, v)))

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

-    v = input() -    if v == "0": +    x = input() +    if x == "0": -    print(("Case {}: {}".format(i, v))) +    print(("Case {}: {}".format(i, x)))