#include <bits/stdc++.h>
using namespace std;
string Y = "YES";
string N = "NO";
string yy = "Yes";
string nn = "No";
int main() {
  long long n;
  while (cin >> n) {
    long long ar[n];
    for (long long i = 0; i < n; i++) {
      cin >> ar[i];
    }
    long long mx = 0;
    vector<long long> v(n);
    for (long long i = n - 1; i >= 0; i--) {
      if (ar[i] > mx) {
        v[i] = 0;
        mx = max(mx, ar[i]);
      } else {
        v[i] = mx + 1 - ar[i];
      }
    }
    for (long long i = 0; i < n; i++) cout << v[i] << " ";
    cout << "\n";
  }
}
