#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
void solve() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int& i : vec) cin >> i;
  vector<int> pref(n);
  pref[n - 1] = vec[n - 1];
  for (int i = (n - 2); i >= 0; i--) {
    pref[i] = max(pref[i + 1], vec[i]);
  }
  vector<int> ans(n);
  ans[n - 1] = 0;
  for (int i = 0; i < n - 1; i++) {
    ans[i] = max(pref[i + 1] - vec[i] + 1, 0);
  }
  for (auto i : ans) cout << i << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
