#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  int ans[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int max = 0;
  for (int i = n - 1; i >= 0; i--) {
    int flag = 0;
    if (arr[i] > max) {
      max = arr[i];
      flag = 1;
    }
    if (max == arr[i] && flag)
      ans[i] = 0;
    else if (arr[i] <= max)
      ans[i] = max + 1 - arr[i];
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << ' ';
  }
  return 0;
}
