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