#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], f[n];
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  f[n - 1] = a[n - 1];
  f[n] = 0;
  for (int i = n - 2; i >= 0; i--) f[i] = max(f[i + 1], a[i]);
  for (int i = 0; i < n; i++)
    if (f[i] == a[i] && f[i + 1] != f[i])
      printf("0 ");
    else
      printf("%d ", f[i] - a[i] + 1);
  cout << endl;
}
