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