#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int n, i, mn = 0;
  cin >> n;
  int a[n + 5], b[n + 5];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = n - 1; i >= 0; i--) {
    if (a[i] > mn) {
      v.push_back(0);
    } else {
      v.push_back(mn + 1 - a[i]);
    }
    mn = max(mn, a[i]);
  }
  reverse(v.begin(), v.end());
  for (auto it : v) cout << it << ' ';
}
