#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, h, m, mx;
  vector<int> vp;
  cin >> n;
  m = n;
  while (n--) {
    cin >> h;
    vp.push_back(h);
  }
  mx = vp[m - 1];
  vp[m - 1] = 0;
  for (int i = m - 2; i >= 0; i--) {
    if (vp[i] <= mx)
      vp[i] = mx - vp[i] + 1;
    else if (vp[i] > mx) {
      mx = vp[i];
      vp[i] = 0;
    }
  }
  for (int i = 0; i < m; i++) cout << vp[i] << ' ';
  return 0;
}
