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