#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const int SIZE = 100005;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> v(n), res(n);
  vector<pair<int, int> > vp;
  for (int i = 0; i < n; i++) cin >> v[i];
  int mx = 0;
  vp.push_back(make_pair(n - 1, v[n - 1]));
  for (int i = n - 1; i >= 1; i--) {
    mx = max(v[i], mx);
    vp.push_back(make_pair(i - 1, mx));
  }
  sort(vp.begin(), vp.end());
  for (int i = 0; i < n - 1; i++) {
    if (vp[i].second < v[i])
      res[i] = v[i];
    else
      res[i] = vp[i].second + 1;
  }
  res[n - 1] = vp[n - 1].second;
  for (int i = 0; i < n; i++) res[i] -= v[i];
  for (int i = 0; i < n; i++) cout << res[i] << " ";
  cout << endl;
  return 0;
}
