#include <bits/stdc++.h>
using namespace std;
int n;
long long int num[100005], maxn;
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; i++) scanf("%lld", &num[i]);
    maxn = num[n - 1];
    num[n - 1] = 0;
    for (int i = n - 2; i >= 0; i--) {
      if (num[i] <= maxn) {
        num[i] = maxn - num[i] + 1;
      } else {
        maxn = num[i];
        num[i] = 0;
      }
    }
    for (int i = 0; i < n; i++) {
      printf("%lld", num[i]);
      if (i != n - 1) printf(" ");
    }
    printf("\n");
  }
  return 0;
}
