#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double PI = acos(-1.0);
const int MOD = 1000 * 1000 * 1000 + 7;
const int INF = 2000 * 1000 * 1000;
const int MAXN = 100010;
template <typename T>
inline T sqr(T n) {
  return n * n;
}
int n;
int a[MAXN], ans[MAXN], suff;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = n; i > 0; i--) {
    suff = max(suff, a[i + 1]);
    ans[i] = max(0, suff + 1 - a[i]);
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
