open System Console.ReadLine() |> ignore Console.ReadLine().Split() |> Seq.map int |> Seq.sort |> Seq.windowed 2 |> Seq.map (Seq.reduce (-)) |> Seq.map (fun x -> abs x) |> Seq.min |> printf "%i"