#include <bits/stdc++.h>
using namespace std;
bool flag;
void fast() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
string con(long long od) {
  stringstream st;
  st << od;
  string pr;
  st >> pr;
  return pr;
}
int main() {
  fast();
  int n, mn = (INT_MIN);
  cin >> n;
  vector<int> v(n, 0);
  vector<int> a(n, 0);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = n - 1; i >= 0; i--) {
    if (mn < v[i]) {
      mn = v[i];
      continue;
    }
    a[i] = mn - v[i] + 1;
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
