#include <bits/stdc++.h>
using namespace std;
const int maxN = 100001;
void process(int a[], int dp[][maxN], int N) {
  int i, j;
  for (i = 0; i < N; i++) dp[0][i] = a[i];
  for (i = 1; i <= (int)(log2(N)); i++)
    for (j = 0; j + (1 << (i - 1)) < N; j++)
      dp[i][j] = max(dp[i - 1][j], dp[i - 1][j + (1 << (i - 1))]);
}
int query(int x, int y, int dp[][maxN], int N) {
  int k = 0;
  while ((1 << (k + 1)) <= (y - x)) k++;
  return max(dp[k][x], dp[k][y - (1 << k) + 1]);
}
int main() {
  int N, i;
  cin >> N;
  int a[N];
  for (i = 0; i < N; i++) cin >> a[i];
  int dp[(int)(log2(N)) + 1][maxN];
  process(a, dp, N);
  int maxim;
  for (i = 0; i < N - 1; i++) {
    maxim = query(i + 1, N - 1, dp, N);
    if (maxim > a[i])
      cout << maxim - a[i] + 1;
    else if (a[i] > maxim)
      cout << 0;
    else
      cout << 1;
    cout << ' ';
  }
  cout << 0;
  return 0;
}
