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