#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, c = 0, w;
  cin >> x;
  int a[x], b[x];
  for (int i = 0; i < x; i++) cin >> a[i];
  w = a[x - 1];
  for (int i = x - 1; i >= 0; i--) {
    if (a[i] == w) b[i] = 1;
    if (a[i] > w) {
      w = a[i];
      b[i] = 0;
    }
    if (a[i] < w) b[i] = abs(w - a[i]) + 1;
  }
  b[x - 1] = 0;
  for (int i = 0; i < x; i++) cout << b[i] << " ";
  return 0;
}
