#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[222222];
  scanf("%d\n", &n);
  pair<int, int> p;
  vector<pair<int, int> > v, v1;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    p.first = x;
    p.second = 0;
    v.push_back(p);
  }
  reverse(v.begin(), v.end());
  int maxi = v[0].first, pos = 0;
  ;
  for (int i = 0; i < v.size(); i++) {
    if (pos != i) {
      if (maxi >= v[i].first) v[i].second = maxi - v[i].first + 1;
      if (maxi < v[i].first) {
        maxi = v[i].first;
        pos = i;
      }
    }
  }
  reverse(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) printf("%d ", v[i].second);
  return 0;
}
