minimum-difference
Source: hackerearth
Difficulty: EASY

Pal loves coding. He solves problems daily on online judges  and participates in college OPCs. He keeps track of time he spents on coding everyday. 

But Pal is inconsistent. Some day he codes for 1000 units of time and other day he may code for 1 unit of time. Now inconsistency in Pal's case is defined as difference of coding times of any two days. Pal wishes to find his minimum inconsistency.

You will be given coding time of Pal for n days. You have to find minimum  inconsistency.

Input:-

First line contains number of test cases t.Each test case begins with number of days n. The next line contains coding times for n days.

Output:-

Print minimum inconsistency per test case.

Constraints:-

t ≤ 20

n ≤ 1000000

coding time for each day ≤ 10000000

SAMPLE INPUT
2
5
2 8 5 9 11
4
3 12 8 5

SAMPLE OUTPUT
1 
2