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