let computeMin xs = let ys = Set.ofSeq xs |> Set.toSeq if Seq.length ys < 2 then 0 else Seq.pairwise ys |> Seq.map (fun (x, y) -> y - x |> abs) |> Seq.min let () = let _ = stdin.ReadLine() let xs = stdin.ReadLine().Split(' ') |> Array.map int computeMin xs |> printfn "%d"