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