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