i = 1

a = eval(input())

while a != 0:

	print("Case %d: %d" % (i, a))

	i = i + 1

	a = eval(input())
lis = []

a = int(input())

while a != 0:

 lis.append(a)

 a = int(input())



for i,v in enumerate(lis):

 print("Case %d: %d" % (i+1,v))
i = 1
a = eval(input())
while a != 0:
    print("Case %d: %d" % (i, a))
    i = i + 1
    a = eval(input())

lis = []
a = int(input())
while a != 0:
    lis.append(a)
    a = int(input())
for i, v in enumerate(lis):
    print("Case %d: %d" % (i + 1, v))

-i = 1 -a = eval(input()) +lis = [] +a = int(input()) -    print("Case %d: %d" % (i, a)) -    i = i + 1 -    a = eval(input()) +    lis.append(a) +    a = int(input()) +for i, v in enumerate(lis): +    print("Case %d: %d" % (i + 1, v))