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