import sys

i=1

for a in sys.stdin:

 if a=='0\n':break

 print(f'Case {i}: {a}',end='');i+=1

import sys

i=1

for a in sys.stdin:

 a=a.strip()

 if'0'==a:break

 print(f'Case {i}: {a}');i+=1

import sys

i = 1
for a in sys.stdin:
    if a == "0\n":
        break
    print(f"Case {i}: {a}", end="")
    i += 1

import sys

i = 1
for a in sys.stdin:
    a = a.strip()
    if "0" == a:
        break
    print(f"Case {i}: {a}")
    i += 1

-    if a == "0\n": +    a = a.strip() +    if "0" == a: -    print(f"Case {i}: {a}", end="") +    print(f"Case {i}: {a}")