#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1], i, g;
  for (i = 1; i <= n; ++i) cin >> a[i];
  g = a[n];
  for (i = n - 1; i > 0; --i) {
    if (a[i] > g) {
      g = a[i];
      a[i] = 0;
    } else if (a[i] <= g) {
      a[i] = (g + 1 - a[i]);
    }
  }
  a[n] = 0;
  for (i = 1; i <= n; ++i) cout << a[i] << " ";
  return 0;
}
