def min_lightbulbs(M, R, street_lights): required_bulbs = 0 position = 0 index = 0 while position < M: next_position = position while index < len(street_lights) and street_lights[index] - R <= position: next_position = max(next_position, street_lights[index] + R) index += 1 if next_position == position: return "IMPOSSIBLE" position = next_position required_bulbs += 1 return required_bulbs def main(): T = int(input()) for t in range(1, T + 1): M, R, N = map(int, input().split()) street_lights = list(map(int, input().split())) result = min_lightbulbs(M, R, street_lights) print(f"Case #{t}: {result}") if __name__ == "__main__": main()