#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int arr_min(int arr[], int a, int b) {
  int min = arr[0];
  for (int i = a; i != b; i++) {
    if (min > arr[i]) min = arr[i];
  }
  return min;
}
int arr_max(int arr[], int a, int b) {
  int max = arr[0];
  for (int i = a; i != b; i++) {
    if (max < arr[i]) max = arr[i];
  }
  return max;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t-- > 0) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int max = INT_MIN;
    vector<int> v;
    for (int i = n - 1; i >= 0; i--) {
      if (arr[i] > max) {
        v.push_back(0);
        max = arr[i];
      } else {
        v.push_back(max - arr[i] + 1);
      }
    }
    for (int i = v.size() - 1; i >= 0; i--) {
      cout << v[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
