#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0;
  int zero = 0;
  vector<int> v;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    if (arr[i] > c) {
      v.push_back(zero);
      c = arr[i];
    } else
      v.push_back(c - arr[i] + 1);
  }
  reverse(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
