{-
	AOJ #1608
	title: Selection of Participants of an Experiment
	@kankichi573
-}
import Data.List
import Data.Functor

main = do dat <- getContents
          let mylist  =  map s2Int $  words dat
	  sequence_ $ map print $ map mindiff $ calc mylist [] 

calc :: [Int] -> [[Int]] -> [[Int]]
calc list   acc = if (length list) <= 1 then acc
                                        else calc (drop (head list)(tail list))
					          (acc ++ ((take (head list)(tail list)) <$ [1]))

mindiff :: [Int] -> Int
mindiff list = minimum (zipWith (-) (tail (sort list)) (sort list))

s2Int :: String -> Int
s2Int str = read str :: Int


     