#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, i, j;
  int max = INT_MIN;
  cin >> n;
  int a[n];
  int b[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (j = n - 1; j >= 0; j--) {
    if (a[j] <= max) {
      b[j] = max + 1 - a[j];
    } else {
      b[j] = 0;
    }
    if (max < a[j]) {
      max = a[j];
    }
  }
  for (i = 0; i < n; i++) {
    cout << b[i] << " ";
  }
  return 0;
}
