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