// Arup Guha
// 4/15/2023
// Solution to 2023 Code Jam Farewell Round A Problem B: Illumination Optimization

import java.util.*;

public class b {

	public static int n;
	public static int m;
	public static int r;
	public static int[] locs;

	public static void main(String[] args) {
	
		Scanner stdin = new Scanner(System.in);
		int nC = stdin.nextInt();
		
		// Process cases.
		for (int loop=1; loop<=nC; loop++) {
			
			m = stdin.nextInt();
			r = stdin.nextInt();
			n = stdin.nextInt();
				
			// Get locations.
			locs = new int[n];
			for (int i=0; i<n; i++)
				locs[i] = stdin.nextInt();
				
			// Solve and output.
			int res = solve();
			if (res == -1)
				System.out.println("Case #"+loop+": IMPOSSIBLE");
			else
				System.out.println("Case #"+loop+": "+res);
		}
	}
	
	public static int solve() {
	
		// Can't do it.
		if (locs[0]-r > 0) return -1;
		
		int res = 0;
		int needAt = 0;
		
		// Loop through lights.
		for (int i=0; i<n; i++) {
		
			// Oops, can't do it!
			if (locs[i]-r > needAt) return -1;
			
			// See if we need one here because the next one can't do it.
			if (i<n-1 && locs[i+1]-r > needAt) {
				needAt = locs[i]+r;
				res++;
				if (needAt >= m) return res;
			}
			
			// Handle the last light separately.
			else if (i == n-1) {
				if (needAt >= m) return res;
				if (locs[i]+r < m) return -1;
				return res+1;
			}
		}
		
		// Probably won't get here.
		return res;
	}
}