#include <bits/stdc++.h>
using namespace std;
bool is_digit(char c) {
  if (c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' ||
      c == '7' || c == '8' || c == '9') {
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int i;
  int p[n];
  int f[n];
  f[n - 1] = 0;
  for (i = 0; i < n; i++) {
    cin >> p[i];
  }
  int m = p[n - 1];
  for (i = n - 2; i >= 0; i--) {
    if (p[i] > m) {
      m = p[i];
      f[i] = 0;
    } else {
      f[i] = max(0, m + 1 - p[i]);
    }
  }
  for (i = 0; i < n; i++) {
    cout << f[i] << " ";
  }
  cout << endl;
}
