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