#include <iostream>
#include <string.h>
#include <algorithm>
#include <cstdio>
using namespace std;

const int maxn = 107;
      int n , run , a[maxn];

void work()
{
    scanf( "%d" , &n );
    for ( int i = 1 ; i <= n ; i++ ) scanf( "%d" , &a[i] );
    sort(a+1,a+1+n);
    int Tmax = 0;
    for ( int i = 1 ; i < n ; i++ ) Tmax = max( Tmax , a[i+1]-a[i] );
    printf( "Class %d\n" , run );
    printf( "Max %d, Min %d, Largest gap %d\n" , a[n] , a[1] , Tmax );
}

int main()
{
    int test;
    scanf( "%d" , &test );
    for ( run = 1 ; run <= test ; run++ ) work();
}
