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