#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 20;
int a[MAXN], ans[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, maximum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  ans[n - 1] = 0, maximum = max(maximum, a[n - 1]);
  for (int i = n - 2; i >= 0; i--) {
    maximum = max(maximum, a[i + 1]);
    if (a[i] <= maximum) ans[i] = maximum - a[i] + 1;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
}
