import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
int k = kb.nextInt();
for(int i=0; i<k; i++) {
int x = kb.nextInt();
sb.append("Class ").append(i+1).append('\n');
int[] arr = new int[x];
for(int s=0; s<x; s++) {
arr[s] = kb.nextInt();
}
Arrays.sort(arr);
sb.append("Max "+ arr[x-1] + ", "+"Min "+ arr[0]+", ");
int maxGap = Integer.MIN_VALUE;
for(int j=1; j<x; j++) {
if(maxGap<arr[j]-arr[j-1]) {
maxGap = arr[j] -arr[j-1];
}
}
sb.append("Largest gap "+ maxGap).append('\n');
}
System.out.println(sb.toString());
}
}