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

There are n holds on the wall, i-th hold is at height ai off the ground. Besides, let the sequence ai increase, that is, ai < ai + 1 for all i from 1 to n - 1; we will call such sequence a track. Mike thinks that the track a1, ..., an has difficulty <image>. 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 a1, ..., an. 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.

Input

The first line contains a single integer n (3 ≤ n ≤ 100) — the number of holds.

The next line contains n space-separated integers ai (1 ≤ ai ≤ 1000), where ai is the height where the hold number i hangs. The sequence ai is increasing (i.e. each element except for the first one is strictly larger than the previous one).

Output

Print a single number — the minimum difficulty of the track after removing a single hold.

Examples

Input

3
1 4 6


Output

5


Input

5
1 2 3 4 5


Output

2


Input

5
1 2 3 7 8


Output

4

Note

In the first sample you can remove only the second hold, then the sequence looks like (1, 6), the maximum difference of the neighboring elements equals 5.

In the second test after removing every hold the difficulty equals 2.

In the third test you can obtain sequences (1, 3, 7, 8), (1, 2, 7, 8), (1, 2, 3, 8), for which the difficulty is 4, 5 and 5, respectively. Thus, after removing the second element we obtain the optimal answer — 4.

import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;

/* Built using CHelper plug-in
* Solution By SANYAM ARORA
*/
//MY CODE STARTS HERE//

public class codeforces{
    static class pair implements Comparable<pair> {
        int a, b;

        public pair(int a, int b) {
            this.a = a;
            this.b = b;
        }


        @Override
        public int compareTo(pair p) {
            return this.b - p.b;
        }
    }
    static  FastReader in;
    static PrintWriter out;
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        in = new FastReader(inputStream);
        out = new PrintWriter(outputStream);
        Ques solver;
        solver = new Ques();
      //  int testNumber=in.nextInt();
        // while(testNumber-->0)
        solver.solve(1, in, out);
        out.close();
    }

    static class Ques {
        public void solve(int testNumber, FastReader in, PrintWriter out){
            int n=in.nextInt();
            int a[]=new int[n+1];
            ArrayList<Integer> ts=new ArrayList<>();
            for(int i=0;i<n;i++) a[i]=in.nextInt();
            long max=0,min=1000000000;
            for(int k=1;k<=n-2;k++){ max=0;
                for(int i=0;i<=n-2;i++){
                    if(i!=k && i+1!=k){
                        if(a[i+1]-a[i]>max) max=a[i+1]-a[i];
                    }
                    else if(i!=k && i+1==k){
                        if(a[i+2]-a[i]>max) max=a[i+2]-a[i];
                    }

                }

                if(max<min) min=max;
            }
            System.out.println(min);



        }
    }
    public static int[] radixSort(int[] f){ return radixSort(f, f.length); }
    public static int[] radixSort(int[] f, int n)
    {
        int[] to = new int[n];
        {
            int[] b = new int[65537];
            for(int i = 0;i < n;i++)b[1+(f[i]&0xffff)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < n;i++)to[b[f[i]&0xffff]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        {
            int[] b = new int[65537];
            for(int i = 0;i < n;i++)b[1+(f[i]>>>16)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < n;i++)to[b[f[i]>>>16]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        return f;
    }
    static final int MAXN = 1000001;
    // stores smallest prime factor for every number
    static int spf[] = new int[MAXN];
    // Calculating SPF (Smallest Prime Factor) for every
    // number till MAXN.
    // Time Complexity : O(nloglogn)
    static void sieve()
    {
        spf[1] = 1;
        for (int i=2; i<MAXN; i++)

            // marking smallest prime factor for every
            // number to be itself.
            spf[i] = i;

        // separately marking spf for every even
        // number as 2
        for (int i=4; i<MAXN; i+=2)
            spf[i] = 2;

        for (int i=3; i*i<MAXN; i++)
        {
            // checking if i is prime
            if (spf[i] == i)
            {
                // marking SPF for all numbers divisible by i
                for (int j=i*i; j<MAXN; j+=i)

                    // marking spf[j] if it is not
                    // previously marked
                    if (spf[j]==j)
                        spf[j] = i;
            }
        }
    }

    // A O(log n) function returning primefactorization
    // by dividing by smallest prime factor at every step
    static Vector<Integer> getFactorization(int x)
    {
        Vector<Integer> ret = new Vector<>();
        while (x != 1&&spf[x]!=0)
        {
            ret.add(spf[x]);
            x = x / spf[x];
        }
        return ret;
    }
    static long GCD(long a, long b) { return (a%b == 0)? Math.abs(b) : GCD(b,a%b); }
    static long ncr(long n,long r){
        if(r==0 || r==n) return 1;
        double d=1;
        if(r>n) r=n-r;
        for(int i=0;i<r;i++){
            d*=(double)(n-i)/(i+1);

        }
        return (long)d;
    }
    static long d, x, y;
    static void extendedEuclid(long A, long B) {
        if(B == 0) {
            d = A;
            x = 1;
            y = 0;
        }
        else {
            extendedEuclid(B, A%B);
            long temp = x;
            x = y;
            y = temp - (A/B)*y;
        }
    }
    static long modInverse(long A, long M)
    {
        extendedEuclid(A,M);
        return (x%M+M)%M;
    }
    static long modPow(long x,long y,long M){
        if(y==0) return 1;
        if(y%2==0) return modPow((x*x)%M,y/2,M);
        else return (x*modPow((x*x)%M,(y-1)/2,M))%M;
    }
    static long M = (long) Math.pow(10,9)+7;
    static long fact(long x){
        if(x==0 || x==1) return 1;
        return ((x%M) * (fact(x-1)%M))%M;
    }
    static long power(long x,long y){
        if(y==0) return 1;
        if(y%2==0) return power((x*x)%M,y/2)%M;
        else return (x*power((x*x)%M,(y-1)/2))%M;
    }
    //MY CODE END HERE//

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }
        private String readLine0(){
            StringBuilder buf = new StringBuilder ();
            int c = read ();
            while (c != '\n' && c != -1){
                if (c != '\r'){
                    buf.appendCodePoint (c);
                }
                c = read ();
            }
            return buf.toString ();
        }
        public String nextLine(){
            String s = readLine0 ();
            while (s.trim ().length () == 0)
                s = readLine0 ();
            return s;
        }
        public String nextLine(boolean ignoreEmptyLines){
            if (ignoreEmptyLines){
                return nextLine ();
            }else{
                return readLine0 ();
            }
        }
        public char nextCharacter(){
            int c = read ();
            while (isSpaceChar (c))
                c = read ();
            return (char) c;
        }

        public double nextDouble(){
            int c = read ();
            while (isSpaceChar (c))
                c = read ();
            int sgn = 1;
            if (c == '-'){
                sgn = -1;
                c = read ();
            }
            double res = 0;
            while (!isSpaceChar (c) && c != '.'){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read ();
            }
            if (c == '.'){
                c = read ();
                double m = 1;
                while (!isSpaceChar (c)){
                    if (c == 'e' || c == 'E'){
                        return res * Math.pow (10, nextInt ());
                    }
                    if (c < '0' || c > '9'){
                        throw new InputMismatchException ();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read ();
                }
            }
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = read();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public String next() {
            return nextString();
        }
        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }
        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public String nextString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public BigInteger nextBigInteger(){
            try{
                return new BigInteger (nextString());
            } catch (NumberFormatException e){
                throw new InputMismatchException ();
            }
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }


    }
}