import bisect T = int(input()) for case in range(1,T+1): M,R,N = map(int, input().strip().split()) Xs = list(map(int, input().strip().split())) ans = 0 frontier = 0 while frontier < M: i = bisect.bisect(Xs, frontier + R) new_frontier = Xs[i-1] + R if i == 0 or frontier == new_frontier: ans = "IMPOSSIBLE" break ans += 1 frontier = new_frontier print(f"Case #{case}: {ans}")