description: Yelisey has an array a of n integers.
  
  If a has length strictly greater than 1, then Yelisei can apply an operation called minimum extraction to it: 
  
    1. First, Yelisei finds the minimal number m in the array. If there are several identical minima, Yelisey can choose any of them. 
    2. Then the selected minimal element is removed from the array. After that, m is subtracted from each remaining element. 
  
  
  
  Thus, after each operation, the length of the array is reduced by 1.
  
  For example, if a = [1, 6, -4, -2, -4], then the minimum element in it is a_3 = -4, which means that after this operation the array will be equal to a=[1 {- (-4)}, 6 {- (-4)}, -2 {- (-4)}, -4 {- (-4)}] = [5, 10, 2, 0].
  
  Since Yelisey likes big numbers, he wants the numbers in the array a to be as big as possible.
  
  Formally speaking, he wants to make the minimum of the numbers in array a to be maximal possible (i.e. he want to maximize a minimum). To do this, Yelisey can apply the minimum extraction operation to the array as many times as he wants (possibly, zero). Note that the operation cannot be applied to an array of length 1.
  
  Help him find what maximal value can the minimal element of the array have after applying several (possibly, zero) minimum extraction operations to the array.
  
  Input
  
  The first line contains an integer t (1 ≤ t ≤ 10^4) — the number of test cases.
  
  The next 2t lines contain descriptions of the test cases.
  
  In the description of each test case, the first line contains an integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the original length of the array a. The second line of the description lists n space-separated integers a_i (-10^9 ≤ a_i ≤ 10^9) — elements of the array a.
  
  It is guaranteed that the sum of n over all test cases does not exceed 2 ⋅ 10^5.
  
  Output
  
  Print t lines, each of them containing the answer to the corresponding test case. The answer to the test case is a single integer — the maximal possible minimum in a, which can be obtained by several applications of the described operation to it.
  
  Example
  
  Input
  
  
  8
  1
  10
  2
  0 0
  3
  -1 2 0
  4
  2 10 1 7
  2
  2 3
  5
  3 2 -4 -2 0
  2
  -1 1
  1
  -2
  
  
  Output
  
  
  10
  0
  2
  5
  2
  2
  2
  -2
  
  Note
  
  In the first example test case, the original length of the array n = 1. Therefore minimum extraction cannot be applied to it. Thus, the array remains unchanged and the answer is a_1 = 10.
  
  In the second set of input data, the array will always consist only of zeros.
  
  In the third set, the array will be changing as follows: [\color{blue}{-1}, 2, 0] → [3, \color{blue}{1}] → [\color{blue}{2}]. The minimum elements are highlighted with \color{blue}{blue}. The maximal one is 2.
  
  In the fourth set, the array will be modified as [2, 10, \color{blue}{1}, 7] → [\color{blue}{1}, 9, 6] → [8, \color{blue}{5}] → [\color{blue}{3}]. Similarly, the maximum of the minimum elements is 5.
solution: import java.io.BufferedReader;
  import java.io.File;
  import java.io.FileOutputStream;
  import java.io.FileReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.io.PrintStream;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.PriorityQueue;
  import java.util.StringTokenizer;
  public  class Main{
      public static String nextLine(){
          String str="";
          try{
              str = input.readLine().trim();
          }
          catch(IOException e){
              e.printStackTrace();
          }
          return str;
      }
      public static String next() {
          while (!tokenizer.hasMoreTokens())
              try {
                  tokenizer=new StringTokenizer(input.readLine().trim());
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return tokenizer.nextToken();
          }
      public static int nextInt() {
          return Integer.parseInt(next());
      }
      public static int[] readArray(int n) {
          int[] a=new int[n];
          for (int i=0; i<n; i++) a[i]=nextInt();
          return a;
      }
      public static long nextLong() {
          return Long.parseLong(next());
      }
      static void out(String s){
          output.append(s);
      }
      static void out(int s){
          output.append(s);
      }
      static void out(double s){
          output.append(s);
      }
      static void out(long s){
          output.append(s);
      }
      static void out(int a[]){
          for(int each:a){
              output.append(each);
              output.append(" ");
          }
      }static void out(long a[]){
          for(long each:a){
              output.append(each);
              output.append(" ");
          }
      }
      static void out(boolean a[]){
          for(boolean each:a){
              output.append(each);
              output.append(" ");
          }
      }
      static void out(char a[]){
          for(char each:a){
              output.append(each);
              output.append(" ");
          }
      }
      static void line(){
          output.append(line);
      }
      static void space(){
          output.append(" ");
      }
      static void out(Object a[]){
          for(Object each:a){
              output.append(each.toString());
              output.append(" ");
          }
      }
      static void out(Object s){
          output.append(s.toString());
      }
  
      static class pair implements Comparable<pair>{
          int a,b;
          pair(int a,int b){
              this.a=a;
              this.b=b;
          }
          pair(){}
          public int compareTo(pair p){
              return this.a-p.a;
          }
          public String toString(){
              return "{"+this.a+","+this.b+"} ";
          }
      }
      static int max(int ...a){
          int max=a[0];
          for(int i=1;i<a.length;i++)
              max=Math.max(max, a[i]);
          return max;
      }
      static int min(int ...a){
          int min=a[0];
          for(int i=1;i<a.length;i++)
              min=Math.min(min, a[i]);
          return min;
      }
      static long max(long ...a){
          long max=a[0];
          for(int i=1;i<a.length;i++)
              max=Math.max(max, a[i]);
          return max;
      }
      static long min(long ...a){
          long min=a[0];
          for(int i=1;i<a.length;i++)
              min=Math.min(min, a[i]);
          return min;
      }
      static int gcd(int a, int b ){
          if(b==0)return a ;
          else return gcd(b,a%b) ;
      }
      static long gcd(long a, long b ){
          if(b==0)return a ;
          else return gcd(b,a%b) ;
      }
      static int binarySearch(int a[],int ele,int l,int h){
          while(l<=h){
              int mid=(l+h)/2;
              if(a[mid]==ele) return mid;
              if(ele<a[mid]) h=mid-1;
              else l=mid+1;
          }
          return -1;
      }
      static int binarySearch(int a[],int ele){
          return binarySearch(a,ele,0,a.length-1);
      }
      static int binarySearch(long a[],long ele,int l,int h){
          while(l<=h){
              int mid=(l+h)/2;
              if(a[mid]==ele) return mid;
              if(ele<a[mid]) h=mid-1;
              else l=mid+1;
          }
          return -1;
      }
      static int binarySearch(long a[],long ele){
          return binarySearch(a,ele,0,a.length-1);
      }
      static int ceil(int a[],int l,int h,int ele){
          int ans=-1;
          while(l<=h){
              int mid=(l+h)/2;
              if(a[mid]>=ele){
                  ans=mid;
                  h=mid-1;
              }
              else l=mid+1;
          }
          return ans;
        }
      static int floor(int a[],int l,int h,int ele){
          int ans=-1;
          while(l<=h){
              int mid=(l+h)/2;
              if(a[mid]<=ele){
                  ans=mid;
                  l=mid+1;
              }
              else h=mid-1; 
          }
          return ans;
        }
        static int ceil(long a[],int l,int h,long ele){
          int ans=-1;
          while(l<=h){
              int mid=(l+h)/2;
              if(a[mid]>=ele){
                  ans=mid;
                  h=mid-1;
              }
              else l=mid+1;
          }
          return ans;
        }
      static int floor(long a[],int l,int h,long ele){
          int ans=-1;
          while(l<=h){
              int mid=(l+h)/2;
              if(a[mid]<=ele){
                  ans=mid;
                  l=mid+1;
              }
              else h=mid-1; 
          }
          return ans;
        }
      static int floor(int a[],int ele){
          return floor(a, 0, a.length-1, ele);
      }
      static int ceil(int a[],int ele){
          return ceil(a,0,a.length-1,ele);
      }
      static int floor(long a[],long ele){
          return floor(a, 0, a.length-1, ele);
      }
      static int ceil(long a[],long ele){
          return ceil(a,0,a.length-1,ele);
      }
      public static void sort(int a[]){
          Arrays.sort(a);
      }
      public static void sort(long a[]){
          Arrays.sort(a);
      }
      public static void reverse(int a[]){
          int i=0,j=a.length-1;
          while(i<j){
              int temp=a[i];
              a[i]=a[j];
              a[j]=temp;
              i++;
              j--;
          }
      }
      public static void reverse(long a[]){
          int i=0,j=a.length-1;
          while(i<j){
              long temp=a[i];
              a[i]=a[j];
              a[j]=temp;
              i++;
              j--;
          }
      }
      static ArrayList<Integer> seive(int n){
          ArrayList<Integer> l= new ArrayList<Integer>();
          boolean prime[]=new boolean[n+1];
          prime[2]=true;
          for(int i=3;i<=n;i+=2)
              prime[i]=true;
          for(int i=3;i*i<=n;i+=2){
              if(prime[i]){
              for(int j=i*i;j<=n;j+=2*i)
                  prime[j]=false;
              }
          }
          l.add(2);
          for(int i=3;i<=n;i+=2)
              if(prime[i]) l.add(i);
          return l;
      }
      static boolean[] seiveArray(int n){
          boolean prime[]=new boolean[n+1];
          prime[2]=true;
          for(int i=3;i<=n;i+=2)
              prime[i]=true;
          for(int i=3;i*i<=n;i+=2){
              if(prime[i]){
              for(int j=i*i;j<=n;j+=2*i)
                  prime[j]=false;
              }
          }
         return prime;
      }
      static BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
      static StringTokenizer tokenizer=new StringTokenizer("");
      static StringBuilder output=new StringBuilder();
      static String line="\n";
      static void setJudge() throws Exception{
      boolean oj = System.getProperty("ONLINE_JUDGE") != null;
      if(oj){
        input=new BufferedReader(new FileReader(new File("input.txt")));
        PrintStream out = new PrintStream(new FileOutputStream("output.txt"));
        System.setOut(out);
      }
      else
        input=new BufferedReader(new InputStreamReader(System.in));
   }
    public static void main(String args[]) throws Exception{
      //  setJudge();
  
       int t=nextInt();
       //  int t=1;
        while(t>0){
          solve();
          t--;
        }
        System.out.print(output);
    }
    static void solve() throws Exception {
        int n=nextInt();
        PriorityQueue<Long> p = new PriorityQueue<Long>();
        for(int i=0;i<n;i++)
          p.add(nextLong());
        long x=p.poll();
        long min=x;
        while(!p.isEmpty()){
            min=Math.max(min,p.peek()-x);
            x+=(p.poll()-x);
    }
    out(min);
    line();
  }
  }