#include <bits/stdc++.h>
using namespace std;
int arr[101];
int d[101];
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> arr[i];
  for (int i = 1; i < N; ++i) d[i] = arr[i] - arr[i - 1];
  int ans = 1001;
  for (int i = 1; i < N - 1; ++i) {
    int temp1 = 0;
    for (int j = 1; j < N; ++j) {
      int temp2;
      if (i == j) {
        temp2 = d[j] + d[j + 1];
        j++;
      } else
        temp2 = d[j];
      temp1 = max(temp1, temp2);
    }
    ans = min(ans, temp1);
  }
  cout << ans << endl;
  return 0;
}
