#include <bits/stdc++.h>
using namespace std;
void Rd(int &res) {
  char c;
  res = 0;
  while (c = getchar(), !isdigit(c))
    ;
  do {
    res = (res << 3) + (res << 1) + (c ^ 48);
  } while (c = getchar(), isdigit(c));
}
int A[100005], B[100005];
int main() {
  int n, i, j, k;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    Rd(A[i]);
    B[i] = A[i];
  }
  A[n + 1] = 0;
  for (i = n - 1; i >= 1; i--) A[i] = max(A[i], A[i + 1]);
  for (i = 1; i <= n; i++) {
    int t = A[i + 1] + 1 - B[i];
    if (t < 0) t = 0;
    printf("%d ", t);
  }
  return 0;
}
