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