#include <bits/stdc++.h>
using namespace std;
int n, i, a[100001], b[100001], k;
int main() {
  cin >> n;
  for (; i < n; i++) cin >> a[i];
  while (i--) {
    k = max(k, a[i]);
    b[i] = k;
  }
  for (i = 0; i < n; i++)
    cout << (b[i] == b[i + 1] ? b[i] - a[i] + 1 : 0) << " ";
}
