There are n athletes in front of you. Athletes are numbered from 1 to n from left to right. You know the strength of each athlete — the athlete number i has the strength s_i.

You want to split all athletes into two teams. Each team must have at least one athlete, and each athlete must be exactly in one team.

You want the strongest athlete from the first team to differ as little as possible from the weakest athlete from the second team. Formally, you want to split the athletes into two teams A and B so that the value |max(A) - min(B)| is as small as possible, where max(A) is the maximum strength of an athlete from team A, and min(B) is the minimum strength of an athlete from team B.

For example, if n=5 and the strength of the athletes is s=[3, 1, 2, 6, 4], then one of the possible split into teams is: 

  * first team: A = [1, 2, 4], 
  * second team: B = [3, 6]. 



In this case, the value |max(A) - min(B)| will be equal to |4-3|=1. This example illustrates one of the ways of optimal split into two teams.

Print the minimum value |max(A) - min(B)|.

Input

The first line contains an integer t (1 ≤ t ≤ 1000) — the number of test cases in the input. Then t test cases follow.

Each test case consists of two lines. 

The first line contains positive integer n (2 ≤ n ≤ 50) — number of athletes. 

The second line contains n positive integers s_1, s_2, …, s_n (1 ≤ s_i ≤ 1000), where s_i — is the strength of the i-th athlete. Please note that s values may not be distinct.

Output

For each test case print one integer — the minimum value of |max(A) - min(B)| with the optimal split of all athletes into two teams. Each of the athletes must be a member of exactly one of the two teams.

Example

Input


5
5
3 1 2 6 4
6
2 1 3 2 4 3
4
7 9 3 1
2
1 1000
3
100 150 200


Output


1
0
2
999
50

Note

The first test case was explained in the statement. In the second test case, one of the optimal splits is A=[2, 1], B=[3, 2, 4, 3], so the answer is |2-2|=0.
from sys import stdin
from collections import deque
# https://codeforces.com/contest/1354/status/D
mod = 10**9 + 7
import sys
import random
# sys.setrecursionlimit(10**6)
from queue import PriorityQueue
# def rl():
#     return [int(w) for w in stdin.readline().split()]
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt,factorial,gcd,log2,inf,ceil
# map(int,input().split())
# # l = list(map(int,input().split()))
# from itertools import permutations
import heapq
# input = lambda: sys.stdin.readline().rstrip()
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

# def ncr(x, y):
#     return f(x) // (f(y) * f(x - y))
def ncr(n, r, p):
    num = den = 1
    for i in range(r):
        num = (num * (n - i)) % p
        den = (den * (i + 1)) % p
    return (num * pow(den,
                      p - 2, p)) % p

import sys

# input = sys.stdin.readline
# LCA
# def bfs(na):
#
#     queue = [na]
#     boo[na] = True
#     level[na] = 0
#
#     while queue!=[]:
#
#         z = queue.pop(0)
#
#         for i in hash[z]:
#
#             if not boo[i]:
#
#                 queue.append(i)
#                 level[i] = level[z] + 1
#                 boo[i] = True
#                 dp[i][0] = z
#
#
#
# def prec(n):
#
#     for i in range(1,20):
#
#         for j in range(1,n+1):
#             if dp[j][i-1]!=-1:
#                 dp[j][i] = dp[dp[j][i-1]][i-1]
#
#
# def lca(u,v):
#     if level[v] < level[u]:
#         u,v = v,u
#
#     diff = level[v] - level[u]
#
#
#     for i in range(20):
#         if ((diff>>i)&1):
#             v = dp[v][i]
#
#
#     if u == v:
#         return u
#
#
#     for i in range(19,-1,-1):
#         # print(i)
#         if dp[u][i] != dp[v][i]:
#
#             u = dp[u][i]
#             v = dp[v][i]
#
#
#     return dp[u][0]
#
# dp = []
#
#
# n = int(input())
#
# for i in range(n + 10):
#
#     ka = [-1]*(20)
#     dp.append(ka)


# class FenwickTree:
#     def __init__(self, x):
#         """transform list into BIT"""
#         self.bit = x
#         for i in range(len(x)):
#             j = i | (i + 1)
#             if j < len(x):
#                 x[j] += x[i]
#
#     def update(self, idx, x):
#         """updates bit[idx] += x"""
#         while idx < len(self.bit):
#             self.bit[idx] += x
#             idx |= idx + 1
#
#     def query(self, end):
#         """calc sum(bit[:end])"""
#         x = 0
#         while end:
#             x += self.bit[end - 1]
#             end &= end - 1
#         return x
#
#     def find_kth_smallest(self, k):
#         """Find largest idx such that sum(bit[:idx]) <= k"""
#         idx = -1
#         for d in reversed(range(len(self.bit).bit_length())):
#             right_idx = idx + (1 << d)
#             if right_idx < len(self.bit) and k >= self.bit[right_idx]:
#                 idx = right_idx
#                 k -= self.bit[idx]
#         return idx + 1



# import sys
# def rs(): return sys.stdin.readline().strip()
# def ri(): return int(sys.stdin.readline())
# def ria(): return list(map(int, sys.stdin.readline().split()))
# def prn(n): sys.stdout.write(str(n))
# def pia(a): sys.stdout.write(' '.join([str(s) for s in a]))
#
#
# import gc, os
#
# ii = 0
# _inp = b''
#
#
# def getchar():
#     global ii, _inp
#     if ii >= len(_inp):
#         _inp = os.read(0, 100000)
#         gc.collect()
#         ii = 0
#     if not _inp:
#         return b' '[0]
#     ii += 1
#     return _inp[ii - 1]
#
#
# def input():
#     c = getchar()
#     if c == b'-'[0]:
#         x = 0
#         sign = 1
#     else:
#         x = c - b'0'[0]
#         sign = 0
#     c = getchar()
#     while c >= b'0'[0]:
#         x = 10 * x + c - b'0'[0]
#         c = getchar()
#     if c == b'\r'[0]:
#         getchar()
#     return -x if sign else x

# fenwick Tree

# n,q = map(int,input().split())
#
#
# l1 = list(map(int,input().split()))
#
# l2 = list(map(int,input().split()))
#
# bit = [0]*(10**6 + 1)
#
# def update(i,add,bit):
#
#     while i>0 and i<len(bit):
#
#         bit[i]+=add
#         i = i + (i&(-i))
#
#
# def sum(i,bit):
#     ans = 0
#     while i>0:
#
#         ans+=bit[i]
#         i = i - (i & ( -i))
#
#
#     return ans
#
# def find_smallest(k,bit):
#
#     l = 0
#     h = len(bit)
#     while l<h:
#
#         mid = (l+h)//2
#         if k <= sum(mid,bit):
#             h = mid
#         else:
#             l = mid + 1
#
#
#     return l
#
#
# def insert(x,bit):
#     update(x,1,bit)
#
# def delete(x,bit):
#     update(x,-1,bit)
# fa = set()
#
# for i in l1:
#     insert(i,bit)
#
#
# for i in l2:
#     if i>0:
#         insert(i,bit)
#
#     else:
#         z = find_smallest(-i,bit)
#
#         delete(z,bit)
#
#
# # print(bit)
# if len(set(bit)) == 1:
#     print(0)
# else:
#     for i in range(1,n+1):
#         z = find_smallest(i,bit)
#         if z!=0:
#             print(z)
#             break
#






















































































































































































































































# binary lifting Technique

# n = int(input())
# max_log = int(input())
# dp = []
# for i in range(n+1):
#     c = [0]*(max_log + 1)
#     dp.append(c)
# par = []
# for i in range(1,n+1):
#     for j in range(0,n+1):
#         if (1<<j)>n:
#             break
#         dp[i][j] = -1
#
# for i in range(1,n+1):
#     dp[i][0] = par[i]
#
# for j in range(1,n+1):
#     if (1<<j)>n:
#         break
#     for i in range(1,n+1):
#         if dp[i][j-1]!=-1:
#             dp[i][j] = dp[dp[i][j-1]][j-1]
#
# level = defaultdict(int)
# def lca(u,v):
#  if level[u] < level[v]:
#      u,v = v,u
#
#  dist = level[u] - level[v]
#  while dist>0:
#      raise_by = int(log2(dist))
#      u = dp[u][raise_by]
#      dist-=1<<raise_by
#
#  if u == v:
#      return u
#
#  for j in range(max_log,-1,-1):
#
#      if dp[u][j]!=-1 and dp[u][j]!=dp[v][j]:
#          u = dp[u][j]
#          v = dp[v][j]
#
#
#
#
#
#
#  return par[u]






t = int(input())

for _ in range(t):

   n = int(input())
   l = list(map(int,input().split()))

   l.sort()
   count = inf
   for i in range(n-1):
       count = min(count,l[i+1]-l[i])

   print(count)
