#include <bits/stdc++.h>
const long long INF = 2e9;
const long long N = 1e5 + 1;
const long long mod = 1e9 + 7;
const long double eps = 1E-7;
using namespace std;
bool used[10001];
void solve() {
  int n, a[N];
  vector<int> v;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int mx = 0;
  for (int i = n - 1; i >= 0; --i) {
    if (mx < a[i]) {
      v.push_back(0);
      mx = a[i];
      continue;
    }
    if (mx >= a[i]) {
      v.push_back(max(0, mx - a[i] + 1));
      continue;
    }
  }
  for (int i = n - 1; i >= 0; --i) cout << v[i] << " ";
}
bool mtest = false;
int main() {
  ios_base::sync_with_stdio(0);
  int TE = 1;
  if (mtest) cin >> TE;
  while (TE--) solve();
  return 0;
}
