#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  int n, i, m, s;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  m = a[n];
  a[n] = 0;
  for (i = n - 1; i > 0; i--) {
    s = m + 1 - a[i];
    m = max(m, a[i]);
    a[i] = s < 0 ? 0 : s;
  }
  for (i = 1; i <= n; i++) printf("%d%c", a[i], i < n ? ' ' : '\n');
  return 0;
}
