#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> v(n), s(n);
  for (int i = 0; i < n; i++) cin >> v[i], s[i] = v[i];
  reverse(s.begin(), s.end());
  long long mx = 0;
  for (int i = 0; i < n; i++) s[i] = max(s[i], mx), mx = s[i];
  reverse(s.begin(), s.end());
  for (int i = 0; i < n - 1; i++) {
    if (v[i] <= s[i + 1])
      v[i] = s[i + 1] - v[i] + 1;
    else
      v[i] = 0;
  }
  v[n - 1] = 0;
  for (int i = 0; i < n; i++) {
    if (i) cout << ' ';
    cout << v[i];
  }
  cout << endl;
  return 0;
}
