#include <bits/stdc++.h>
using namespace std;
int h[100002], p[100002];
int main() {
  int n, m = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    if (h[i] > m) {
      p[i] = 0;
      m = h[i];
    } else {
      p[i] = (m + 1) - h[i];
    }
  }
  for (int i = 0; i < n; i++) {
    cout << p[i];
    if (i == n - 1)
      cout << '\n';
    else
      cout << ' ';
  }
  return 0;
}
