#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  a[n] = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<int> res;
  for (int i = n - 1; i >= 0; --i) {
    res.push_back(max(0, a[i + 1] - a[i] + 1));
    a[i] = max(a[i], a[i + 1]);
  }
  for (int i = n - 1; i >= 0; --i) {
    cout << res[i] << " ";
  }
}
