#include <bits/stdc++.h>
using namespace std;
map<int, int> mm;
int main() {
  int i, j, n;
  cin >> n;
  int a[n];
  vector<int> res;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  int mx = -1;
  for (i = n - 1; i >= 0; i--) {
    mx = max(mx, a[i]);
    mm[mx]++;
    if (mx == a[i] && mm[mx] == 1)
      res.push_back(0);
    else if (mx == a[i] && mm[mx] > 1)
      res.push_back(1);
    else
      res.push_back(mx - a[i] + 1);
  }
  reverse(res.begin(), res.end());
  for (auto e : res) cout << e << " ";
  cout << endl;
  return 0;
}
