def install_lightbulbs(M, R, N, street_lights): street_lights.sort() num_lightbulbs = 0 i = 0 while i < N: # Find the furthest street light that can be illuminated by a single lightbulb furthest_light = -1 while i < N and street_lights[i] <= furthest_light + R: i += 1 if i == N: break # If there is a gap between the last street light and the furthest light that can be illuminated, # it's impossible to cover the entire freeway if street_lights[i-1] + R < M: return "IMPOSSIBLE" num_lightbulbs += 1 furthest_light = street_lights[i-1] + R return num_lightbulbs # Read input Tc = int(input()) # Number of test cases for t in range(1, Tc+1): M, R, N = map(int, input().split()) # Read freeway length, lightbulb illumination radius, and number of street lights street_lights = list(map(int, input().split())) # Read the positions of street lights result = install_lightbulbs(M, R, N, street_lights) print("Case #{}: {}".format(t, result))