#include <bits/stdc++.h>
const int maxn = 1e5 + 100;
int n, m, x[maxn], y[maxn];
std::map<int, int> M;
std::set<int> dpx, dpy;
bool check(int D) {
  dpx.clear();
  dpy.clear();
  dpy.insert(x[1]);
  for (int i = 3; i <= n; ++i) {
    bool fx = ((int)(dpy).size()), fy = ((int)(dpx).size());
    while (((int)(dpx).size())) {
      auto it = dpx.begin();
      if (std::abs(x[i] - *it) > D) {
        dpx.erase(dpx.begin());
      } else {
        break;
      }
    }
    while (((int)(dpx).size())) {
      auto it = dpx.end();
      --it;
      if (std::abs(x[i] - *it) > D) {
        dpx.erase(it);
      } else {
        break;
      }
    }
    while (((int)(dpy).size())) {
      auto it = dpy.begin();
      if (std::abs(x[i] - *it) > D) {
        dpy.erase(dpy.begin());
      } else {
        break;
      }
    }
    while (((int)(dpy).size())) {
      auto it = dpy.end();
      --it;
      if (std::abs(x[i] - *it) > D) {
        dpy.erase(it);
      } else {
        break;
      }
    }
    if (fx && abs(x[i] - x[i - 1]) <= D) {
      dpx.insert(x[i - 1]);
    }
    if (fy && abs(x[i] - x[i - 1]) <= D) {
      dpy.insert(x[i - 1]);
    }
  }
  return ((int)(dpx).size()) || ((int)(dpy).size());
}
int main() {
  scanf("%d%d%d", &n, x + 1, x + 2);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", x + i + 2);
  }
  n += 2;
  int l = abs(x[2] - x[1]), r = 1000000000;
  while (l <= r) {
    int mid = l + r >> 1;
    if (check(mid)) {
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  printf("%d\n", l);
  return 0;
}
