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