#include <bits/stdc++.h>
using namespace std;
int x[100009], a[100009];
int main() {
  int n, mx;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> x[i];
  a[n - 1] = 0;
  mx = x[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    if (mx == x[i]) {
      a[i] = 1;
    } else if (mx < x[i]) {
      a[i] = 0;
      mx = x[i];
    } else {
      a[i] = mx + 1 - x[i];
    }
  }
  for (int i = 0; i < n; ++i) cout << a[i] << " ";
  cout << endl;
  return 0;
}
