#include <bits/stdc++.h>
int a[100010];
int b[100010];
int main() {
  int n;
  scanf("%d", &n);
  memset(a, 0, sizeof(a));
  memset(b, 0, sizeof(b));
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int max1 = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    b[i] = max1 - a[i] + 1;
    if (b[i] < 0) b[i] = 0;
    if (max1 < a[i]) max1 = a[i];
  }
  for (int i = 0; i < n - 1; i++) printf("%d ", b[i]);
  printf("%d\n", b[n - 1]);
  return 0;
}
