import std.stdio, std.string, std.conv, std.algorithm; import std.range, std.array, std.container, std.math, std.typecons; immutable int mod = 10^^9 + 7; int N; int[] x; void main() { N = readln.chomp.to!int; x = readln.split.to!(int[]).sort().uniq.array; N = x.length.to!int; if (x.length == 1) writeln(0); else iota(N - 1).map!(i => x[i + 1] - x[i]).minElement.writeln; }