importjava.util.Scanner;publicclassSolution{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);intT=sc.nextInt();for(inttc=1;tc<=T;tc++){intN=sc.nextInt();int[]wall=newint[N];for(inti=0;i<N;i++){wall[i]=sc.nextInt();}intup=0;intdown=0;for(inti=0;i<N-1;i++){if((wall[i]-wall[i+1])>0){// 왼쪽 벽이 더 클 경우down=(down>wall[i]-wall[i+1])?down:wall[i]-wall[i+1];}else{up=(up>wall[i+1]-wall[i])?up:wall[i+1]-wall[i];}}System.out.println("#"+tc+" "+up+" "+down);}}}