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