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