#include <bits/stdc++.h>
using namespace std;
int n, a[200005], big;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    big = 0;
    for (int j = 1; j <= n; j++)
      for (int k = j + 1; k <= n; k++) {
        if (a[j] != a[i] && a[k] != a[i] && a[j] >= a[k] && big < a[j] - a[k])
          big = a[j] - a[k];
        if (a[j] != a[i] && a[k] != a[i] && a[j] < a[k] && big < a[k] - a[j])
          big = a[k] - a[j];
      }
    cout << big;
  }
  return 0;
}
