#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> res(n, 0);
  int mx = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] > mx) {
      mx = a[i];
      res[i] = 0;
    } else {
      int diff = mx - a[i];
      res[i] = diff + 1;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << res[i] << " ";
  }
  cout << "\n";
}
int main() {
  std::ios::sync_with_stdio(false);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
