#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int maxn = 100005;
const int maxm = 10005;
int h[maxn], ans[maxn];
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> h[i];
  }
  int maxh = 0;
  for (int i = n; i >= 1; i--) {
    if (h[i] > maxh)
      ans[i] = 0;
    else {
      ans[i] = maxh - h[i] + 1;
    }
    maxh = max(maxh, h[i]);
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
int main() {
  solve();
  return 0;
}
