#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, h[maxn], ans[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> h[i];
  int _max = h[n];
  for (int i = n - 1; i >= 1; i--) {
    if (h[i] > _max)
      ans[i] = 0;
    else
      ans[i] = _max - h[i] + 1;
    _max = max(_max, h[i]);
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
