public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		while ((line = in.readLine()) != null && line.length() != 0) {
			int cases = Integer.parseInt(line);
			for (int i = 0; i < cases; i++) {
				in.readLine();
				int[] a = readInts(in.readLine());
				int max = a[0];
				for (int e : a)
					max = Math.max(e, max);
				out.append("Case " + (i + 1) + ": " + max + "\n");
			}
		}
		System.out.print(out);
	}