#include <bits/stdc++.h>
int maxsize = 30;
using namespace std;
int main() {
  int n;
  int A[100005];
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> A[i];
  int m = 0;
  int ans[100005];
  ans[n] = 0;
  for (int i = n - 1; i >= 1; i--) {
    m = max(m, A[i + 1]);
    ans[i] = m + 1 - A[i];
    if (ans[i] < 0) ans[i] = 0;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
