while int(eval(input())) > 0:

    s = sorted(map(int, input().split()))

    print((min(abs(a - b) for (a, b) in zip(s, s[1:]))))
while True:

    if int(eval(input())) == 0:

        break

    s = sorted(map(int, input().split()))

    r = min(abs(x - y) for (x, y) in zip(s, s[1:]))

    print(r)
while int(eval(input())) > 0:
    s = sorted(map(int, input().split()))
    print((min(abs(a - b) for (a, b) in zip(s, s[1:]))))

while True:
    if int(eval(input())) == 0:
        break
    s = sorted(map(int, input().split()))
    r = min(abs(x - y) for (x, y) in zip(s, s[1:]))
    print(r)

-while int(eval(input())) > 0: +while True: +    if int(eval(input())) == 0: +        break -    print((min(abs(a - b) for (a, b) in zip(s, s[1:])))) +    r = min(abs(x - y) for (x, y) in zip(s, s[1:])) +    print(r)