Mike is trying rock climbing but he is awful at it. 

There are *n* holds on the wall, *i*-th hold is at height *a*<sub class="lower-index">*i*</sub> off the ground. Besides, let the sequence *a*<sub class="lower-index">*i*</sub> increase, that is, *a*<sub class="lower-index">*i*</sub> &lt; *a*<sub class="lower-index">*i* + 1</sub> for all *i* from 1 to *n* - 1; we will call such sequence a track. Mike thinks that the track *a*<sub class="lower-index">1</sub>, ..., *a*<sub class="lower-index">*n*</sub> has difficulty <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/628ae8aa5beb7d3e129e79061d30d8f05adfc069.png" style="max-width: 100.0%;max-height: 100.0%;"/>. In other words, difficulty equals the maximum distance between two holds that are adjacent in height.

Today Mike decided to cover the track with holds hanging on heights *a*<sub class="lower-index">1</sub>, ..., *a*<sub class="lower-index">*n*</sub>. To make the problem harder, Mike decided to remove one hold, that is, remove one element of the sequence (for example, if we take the sequence (1, 2, 3, 4, 5) and remove the third element from it, we obtain the sequence (1, 2, 4, 5)). However, as Mike is awful at climbing, he wants the final difficulty (i.e. the maximum difference of heights between adjacent holds after removing the hold) to be as small as possible among all possible options of removing a hold. The first and last holds must stay at their positions.

Help Mike determine the minimum difficulty of the track after removing one hold.
The first line contains a single integer *n* (3 ≤ *n* ≤ 100) — the number of holds.

The next line contains *n* space-separated integers *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 1000), where *a*<sub class="lower-index">*i*</sub> is the height where the hold number *i* hangs. The sequence *a*<sub class="lower-index">*i*</sub> is increasing (i.e. each element except for the first one is strictly larger than the previous one).
"""http://codeforces.com/problemset/problem/496/A"""

def solve(n, l):
    difficulties = []
    _max = 0
    for i in range(1, n):
        d = l[i] - l[i - 1]
        difficulties.append(d)
        _max = max(_max, d)
    new_difficult = 1000 * 2
    for i in range(1, len(difficulties)):
        new_difficult = min(new_difficult, difficulties[i] + difficulties[i - 1])
    return max(new_difficult, _max)

if __name__ == '__main__':
    n = int(input())
    l = list(map(int, input().split()))
    print(solve(n, l))
