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