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