#include <bits/stdc++.h>
using namespace std;
int n, hs[100001], ans[100001];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> hs[i];
  int maxx = 0;
  for (int i = n; i; --i) {
    ans[i] = max(maxx - hs[i] + 1, 0);
    maxx = max(maxx, hs[i]);
  }
  for (int i = 1; i < n; ++i) cout << ans[i] << ' ';
  cout << ans[n] << endl;
  return 0;
}
