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.IOException;
  import java.io.InputStreamReader;
  import java.util.*;
  public class C{
  	public static void main(String[] args){
  		FastReader sc = new FastReader();
  		int t=sc.nextInt();
  		while(t-->0){
  			int n=sc.nextInt();
  			ArrayList<Integer> a= new ArrayList<>();
  			for(int i=0;i<n;i++)a.add(sc.nextInt());
  			Collections.sort(a);
  			if(n==1) {
  				System.out.println(a.get(0));
  				continue;
  			}
  			int ans=a.get(0);
  			for(int i=1;i<n;i++) {
  				ans=Math.max(ans, a.get(i)-a.get(i-1));
  			}
  			System.out.println(ans);
  		}		 
      }
  
  	static class pair {
  		int x;int y;
  		 pair(int x,int y){
  			this.x=x;
  			this.y=y;
  		}
  		
  	}
  	static ArrayList<Integer> primeFac(int n){
  		ArrayList<Integer>ans = new ArrayList<Integer>();
  		int lp[]=new int [n+1];
  		Arrays.fill(lp, 0);  	//0-prime
  		for(int i=2;i<=n;i++) {
  			if(lp[i]==0) {
  				for(int j=i;j<=n;j+=i) {
  					if(lp[j]==0) lp[j]=i;
  				}
  			}
  		}
  		int fac=n;
  		while(fac>1) {
  			ans.add(lp[fac]);
  			fac=fac/lp[fac];
  		}
  		print(ans);
  		return ans;
  	}
  	static ArrayList<Long> prime_in_given_range(long l,long r){
  		ArrayList<Long> ans= new ArrayList<>();
  		int n=(int)Math.sqrt(r)+1;
  		int prime[]=sieve_of_Eratosthenes(n);
  		long res[]=new long [(int)(r-l)+1];
  		for(int i=0;i<=r-l;i++) {
  			res[i]=i+l;
  		}
  		for(int i=0;i<prime.length;i++) {
  			if(prime[i]==1) {
  				System.out.println(2);
  				for(int j=Math.max((int)i*i, (int)(l+i-1)/i*i);j<=r;j+=i) {
  					res[j-(int)l]=0; 
  				}
  			}
  		}
  		for(long i:res) if(i!=0)ans.add(i);
  		return ans;
  	}
  	static int [] sieve_of_Eratosthenes(int n) {
  		int prime[]=new int [n];
  		Arrays.fill(prime, 1);  // 1-prime | 0-not prime
  		prime[0]=prime[1]=0;
  		for(int i=2;i<n;i++) {
  			if(prime[i]==1) {
  				for(int j=i*i;j<n;j+=i) {
  					prime[j]=0;
  				}
  			}
  		}
  		return prime;
  	}
  	static long binpow(long a,long b) {
  		long res=1;
  		if(b==0)return a;
  		if(a==0)return 1;
  		while(b>0) {
  			if((b&1)==1) {
  				res*=a;
  			}
  			a*=a;
  			b>>=1;
  		}
  		return res;
  	}
  	static void print(int a[]) {
  		System.out.println(a.length);
  		for(int i:a) {
  			System.out.print(i+" ");
  		}
  		System.out.println();
  	}
  	static void print(long a[]) {
  		System.out.println(a.length);
  		for(long i:a) {
  			System.out.print(i+" ");
  		}
  		System.out.println();
  	}
  	static long rolling_hashcode(String s ,int st,int end,long Hashcode,int n) {
  		if(end>=s.length()) return -1;
  		int mod=1000000007;
  		
  		Hashcode=Hashcode-(s.charAt(st-1)*(long)Math.pow(27,n-1));
  		Hashcode*=10;
  		
  		Hashcode=(Hashcode+(long)s.charAt(end))%mod;
  		return Hashcode;
  		
  	}
  	static long  hashcode(String s,int n) {
  		long code=0;
  		for(int i=0;i<n;i++) {
  			code+=((long)s.charAt(i)*(long)Math.pow(27, n-i-1)%1000000007);
  		}
  		return code;
  	}
  	static void print(ArrayList<Integer> a) {
  		System.out.println(a.size());
  		for(long i:a) {
  			System.out.print(i+" ");
  		}
  		System.out.println();
  	}
  	static class FastReader {
  		BufferedReader br;
  		StringTokenizer st;
  
  		public FastReader()
  		{
  			br = new BufferedReader(
  				new InputStreamReader(System.in));
  		}
  		int [] fastArray(int n) {
  			int a[]=new int [n];
  			for(int i=0;i<n;i++) {
  				a[i]=nextInt();
  			}
  			return a;
  		}
  		String next()
  		{
  			while (st == null || !st.hasMoreElements()) {
  				try {
  					st = new StringTokenizer(br.readLine());
  				}
  				catch (IOException e) {
  					e.printStackTrace();
  				}
  			}
  			return st.nextToken();
  		}
  
  		int nextInt() { return Integer.parseInt(next()); }
  
  		long nextLong() { return Long.parseLong(next()); }
  
  		double nextDouble()
  		{
  			return Double.parseDouble(next());
  		}
  
  		String nextLine()
  		{
  			String str = "";
  			try {
  				str = br.readLine();
  			}
  			catch (IOException e) {
  				e.printStackTrace();
  			}
  			return str;
  		}
  	}
  
  }