#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 500;
int n, p[maxn], maxv[maxn];
int main(int argc, char *argv[]) {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> p[i];
  int ptr = 0;
  for (int i = n - 1; i >= 0; --i) {
    maxv[i] = ptr;
    ptr = max(ptr, p[i]);
  }
  for (int i = 0; i < n; ++i) {
    if (maxv[i] + 1 > p[i]) {
      cout << maxv[i] + 1 - p[i] << " ";
    } else
      cout << "0 ";
  }
  cout << endl;
  return 0;
}
