#include <bits/stdc++.h>
using namespace std;
const int N = 2e6;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int h[n];
  for (int i = 0; i < n; ++i) {
    cin >> h[i];
  }
  vector<int> v(n, 0);
  int maxx = 0;
  for (int i = n - 1; i >= 0; i--) {
    v[i] = max(0, maxx - h[i] + 1);
    maxx = max(maxx, h[i]);
  }
  for (int i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
}
