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