#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int a[maxn], o[maxn];
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
    int _max = 0;
    for (int i = n - 1; i >= 0; --i)
      if (a[i] > _max)
        o[i] = 0, _max = a[i];
      else
        o[i] = _max - a[i] + 1;
    for (int i = 0; i < n; ++i) {
      if (i > 0) printf(" ");
      printf("%d", o[i]);
    }
    printf("\n");
  }
  return 0;
}
