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