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