alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' t = int(input()) for u in range(t): [m,r,n] = [int(i) for i in input().split()] x = [int(i) for i in input().split()] x.reverse() last = 0 nextlamp = x.pop() ans = 0 while last < m: if nextlamp - last > r: ans = 'IMPOSSIBLE' break if len(x) == 0: ans += 1 last = nextlamp + r nextlamp = m + r + 1 else: nextnext = x.pop() if nextnext - last <= r: nextlamp = nextnext else: ans += 1 last = nextlamp + r nextlamp = nextnext print('Case #' + str(u+1) + ':', ans)