#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const double pi = acos(-1);
int a[100010], d[100010], flag[100010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  d[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (d[i + 1] >= a[i]) {
      d[i] = d[i + 1];
      flag[i] = 1;
    } else
      d[i] = a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == d[i] && !flag[i])
      printf("0 ");
    else
      printf("%d ", d[i] + 1 - a[i]);
  }
}
