for i,a in enumerate(iter(input,'0'),1):print(f'Case {i}: {a}')

import sys

for i,a in enumerate(sys.stdin,1):

 if a=='0\n':break

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

for i, a in enumerate(iter(input, "0"), 1):
    print(f"Case {i}: {a}")

import sys

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

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