N = int(input())

for case_id in range(1, N + 1):
    x, y = map(int, input().split())
    print('Case #{}: {}'.format(case_id, 0))

N = int(input())

for case_id in range(1, N + 1):
    x, y = map(int, input().split())
    print('Case #{}: {}'.format(case_id, 0))

#{}: {}'.format(case_id, 0))