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