#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
int a[N];
int b[N];
int main(void) {
  int n;
  while (~scanf("%d", &n)) {
    int i, j;
    for (i = 1; i <= n; i++) scanf("%d", &a[i]);
    b[n] = 0;
    int MAX = a[n];
    for (i = n - 1; i >= 1; i--) {
      if (a[i] <= MAX)
        b[i] = MAX + 1 - a[i];
      else
        b[i] = 0;
      if (MAX < a[i]) MAX = a[i];
    }
    for (i = 1; i < n; i++) printf("%d ", b[i]);
    printf("%d\n", b[n]);
  }
  return 0;
}
