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