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