#include <bits/stdc++.h>
const int MAXN = (int)10e5 + 5;
using namespace std;
int v[MAXN];
int maxH[MAXN];
int main() {
  int N, h;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> v[i];
  }
  int curMax = 0;
  for (int i = N - 1; i >= 0; i--) {
    curMax = max(curMax, v[i]);
    maxH[i] = curMax;
  }
  for (int i = 0; i < N - 1; i++) {
    if (v[i] > (maxH[i + 1]))
      cout << 0 << ' ';
    else
      cout << maxH[i + 1] - v[i] + 1 << " ";
  }
  cout << 0 << endl;
  return 0;
}
