#include <bits/stdc++.h>
using namespace std;
int n, arr[100000], r, arr1[100000], z;
bool boo[100000];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> r;
    arr[i] = r;
  }
  for (int i = 0; i < n; i++) arr1[i] = arr[i];
  reverse(arr1, arr1 + n);
  z = arr1[0];
  boo[0] = 1;
  for (int i = 0; i < n; i++) {
    if (arr1[i] > z) boo[i] = 1;
    if (arr1[i] >= z)
      z = arr1[i];
    else
      arr1[i] = z;
  }
  reverse(arr1, arr1 + n);
  reverse(boo, boo + n);
  for (int i = 0; i < n; i++) {
    int k = arr1[i] - arr[i];
    if (boo[i] == 1)
      cout << 0 << endl;
    else
      cout << k + 1 << endl;
  }
  return 0;
}
