#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m = 0;
  cin >> n;
  vector<pair<int, int>> a(n);
  for (auto &u : a) cin >> u.first;
  a[n - 1].second = 0;
  for (int i = n - 2; i >= 0; i--) {
    m = max(m, a[i + 1].first);
    a[i].second = max(m, a[i + 1].first);
  }
  for (auto &u : a) {
    cout << (u.first > u.second ? 0 : u.second - u.first + 1) << " ";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  solve();
}
