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