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