#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int h[n];
  for (int i = 0; i < n; i++) cin >> h[i];
  int z = 0;
  vector<int> ans;
  for (int i = n - 1; i >= 0; i--) {
    if (z == h[i]) {
      ans.push_back(1);
      continue;
    }
    z = max(z, h[i]);
    if (z - h[i] != 0)
      ans.push_back(z - h[i] + 1);
    else
      ans.push_back(0);
  }
  for (int i = ans.size() - 1; i >= 0; i--) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
