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