#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100009], b[100009], i, flag = 0;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = n - 1; i >= 0; i--) {
    if (a[i] > flag)
      b[i] = -1;
    else
      b[i] = max(a[i], flag);
    flag = max(flag, a[i]);
  }
  for (i = 0; i < n; i++) {
    if (i != n - 1) {
      if (b[i] == -1)
        cout << "0"
             << " ";
      else
        cout << b[i] - a[i] + 1 << " ";
    } else {
      if (b[i] == -1)
        cout << "0";
      else
        cout << b[i] - a[i] + 1;
    }
  }
  return 0;
}
