#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
bool isPrime(long long int n) {
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
bool isPowerOfTwo(long long int x) { return (x && (!(x & (x - 1)))); }
long long int countDigit(long long int num) { return (floor(log10(num)) + 1); }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int test_case = 1;
  while (test_case--) {
    long long int n;
    cin >> n;
    long long int arr[n];
    for (long long int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    long long int maxx = 0;
    vector<long long int> ans;
    for (long long int i = n - 1; i >= 0; i--) {
      if (arr[i] <= maxx) {
        ans.push_back(maxx - arr[i] + 1);
      } else {
        ans.push_back(0);
      }
      maxx = max(arr[i], maxx);
    }
    reverse(ans.begin(), ans.end());
    for (auto it : ans) {
      cout << it << " ";
    }
  }
  return 0;
}
