#include <bits/stdc++.h>
using namespace std;
int n, x;
int f[200100], nn[200100];
int mi(int a, int b) { return a < b ? a : b; }
int ma(int a, int b) { return a > b ? a : b; }
int main() {
  scanf("%d", &n);
  int h = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &f[i]);
  }
  for (int i = n; i >= 1; i--) {
    if (f[i] > h)
      nn[i] = 0;
    else {
      nn[i] = (h + 1) - f[i];
    }
    h = ma(h, f[i]);
  }
  for (int i = 1; i <= n; i++) {
    printf("%d", nn[i]);
    if (i == n)
      printf("\n");
    else
      printf(" ");
  }
  return 0;
}
