import sys, math, itertools, functools, collections input = sys.stdin.readline def solve(testcase): m, r, n = map(int, input().split()) x = [*map(int, input().split())] if x[0] > r or x[-1]+r < m or any(j-i > 2*r for i, j in zip(x, x[1:])): print('Case #'+str(testcase)+':', 'IMPOSSIBLE') return ans = 0 illuminate = 0 cur = 0 while illuminate < m: while cur+1 < n and x[cur+1]-r <= illuminate: cur += 1 illuminate = min(m, x[cur]+r) cur += 1 ans += 1 print('Case #'+str(testcase)+':', ans) for testcase in range(1, int(input())+1): solve(testcase)