#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1], maxx[n + 1];
  for (int i = 1; i < n + 1; ++i) cin >> a[i];
  maxx[n] = a[n];
  for (int i = n - 1; i > 0; --i) maxx[i] = max(maxx[i + 1], a[i]);
  for (int i = 1; i < n; ++i)
    if (maxx[i + 1] >= a[i])
      cout << maxx[i + 1] - a[i] + 1 << ' ';
    else
      cout << "0 ";
  cout << "0";
}
