#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  while (~scanf("%d", &n)) {
    vector<long long int> vec;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    long long int maxx = a[n - 1];
    for (long long int i = n - 2; i >= 0; i--) {
      if (maxx >= a[i])
        vec.push_back(maxx - a[i] + 1);
      else
        vec.push_back(0);
      if (maxx < a[i]) maxx = a[i];
    }
    for (long long int i = n - 2; i >= 0; i--) cout << vec[i] << " ";
    cout << 0 << " ";
    cout << endl;
  }
  return 0;
}
