def solve_case(case_num, m, r, street_lights): street_lights.append(m + r + 1) # add an extra light to cover the end of the freeway n = len(street_lights) i, j = 0, 0 # i is the leftmost uncovered point, j is the rightmost covered point bulbs = 0 while i < m: if street_lights[j] - r <= i: # the current light covers the current point j += 1 elif j < n - 1 and street_lights[j+1] - r <= i: # the next light covers the current point j += 1 bulbs += 1 else: # no light covers the current point print(f"Case #{case_num}: IMPOSSIBLE") return if street_lights[j] + r < street_lights[j+1]: # need to add a new light to cover the gap i = street_lights[j] + r bulbs += 1 else: i = street_lights[j] + r print(f"Case #{case_num}: {bulbs}") # read input and process cases T = int(input()) for case_num in range(1, T+1): M, R, N = map(int, input().split()) street_lights = list(map(int, input().split())) solve_case(case_num, M, R, street_lights)