i = 1

x = eval(input())

while x != "0":

    print(("Case %d: %s" % (i, x)))

    i += 1

    x = eval(input())

    
m = 1

n = "1"

while n != "0":

    n = eval(input())

    if n != "0":

        print(("Case " + str(m) + ": " + n))

    else:

        break

    m += 1
i = 1
x = eval(input())
while x != "0":
    print(("Case %d: %s" % (i, x)))
    i += 1
    x = eval(input())

m = 1
n = "1"
while n != "0":
    n = eval(input())
    if n != "0":
        print(("Case " + str(m) + ": " + n))
    else:
        break
    m += 1

-i = 1 -x = eval(input()) -while x != "0": -    print(("Case %d: %s" % (i, x))) -    i += 1 -    x = eval(input()) +m = 1 +n = "1" +while n != "0": +    n = eval(input()) +    if n != "0": +        print(("Case " + str(m) + ": " + n)) +    else: +        break +    m += 1