#include <bits/stdc++.h>
using namespace std;
long long mx, n, i, j, a, x, t[100000], v[100000];
int main() {
  cin >> n;
  for (i = 0; i < n; i++) cin >> t[i];
  v[n - 1] = 0;
  mx = t[n - 1];
  for (i = n - 2; i >= 0; i--) {
    if (t[i] > mx) {
      v[i] = 0;
      mx = t[i];
    } else
      v[i] = mx - t[i] + 1;
  }
  for (i = 0; i < n; i++) cout << v[i] << " ";
}
