#include <bits/stdc++.h>
using namespace std;
long long int maxt(long long int x, long long int y) { return (x > y) ? x : y; }
int main() {
  long long int n;
  cin >> n;
  long long int arr[n], i;
  for (i = 0; i < n; ++i) cin >> arr[i];
  long long int ans[n];
  ans[n - 1] = arr[n - 1];
  for (i = n - 2; i >= 0; i--) {
    ans[i] = maxt(ans[i + 1], arr[i]);
  }
  for (i = 0; i < n - 1; ++i) {
    if (ans[i + 1] < arr[i])
      cout << "0 ";
    else
      cout << ans[i] - arr[i] + 1 << " ";
  }
  cout << "0";
  return 0;
}
