x = []

while True:

	if 0 in x:

		break

	x.append(int(eval(input())))

x.pop()

for i, v in enumerate(x):

	print((('Case %d: %d') % (i+1, v)))
a = []

while True:

	n = eval(input())

	if n == "0":

		break

	a.append(n)



for i in range(len(a)):

	print(("Case " + str(i + 1) + ": " + a[i]))
x = []
while True:
    if 0 in x:
        break
    x.append(int(eval(input())))
x.pop()
for i, v in enumerate(x):
    print((("Case %d: %d") % (i + 1, v)))

a = []
while True:
    n = eval(input())
    if n == "0":
        break
    a.append(n)
for i in range(len(a)):
    print(("Case " + str(i + 1) + ": " + a[i]))

-x = [] +a = [] -    if 0 in x: +    n = eval(input()) +    if n == "0": -    x.append(int(eval(input()))) -x.pop() -for i, v in enumerate(x): -    print((("Case %d: %d") % (i + 1, v))) +    a.append(n) +for i in range(len(a)): +    print(("Case " + str(i + 1) + ": " + a[i]))