#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n;
  std::vector<int> v(n), s;
  for (int i = 0; i < n; ++i) cin >> v[i];
  reverse(v.begin(), v.end());
  m = v[0];
  for (int i = 0; i < n; ++i) {
    if (v[i] > m || i == 0) {
      s.push_back(0);
      m = v[i];
    } else
      s.push_back(m - v[i] + 1);
  }
  for (auto j = s.rbegin(); j != s.rend(); ++j) cout << *j << " ";
  return 0;
}
