#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), m(n);
  for (int& x : a) cin >> x;
  m[n - 1] = 0;
  for (int i = n - 2; i >= 0; --i) m[i] = max(a[i + 1], m[i + 1]);
  for (int i = 0; i < n; ++i)
    cout << (a[i] > m[i] ? 0 : m[i] - a[i] + 1) << ' ';
}
