#include <bits/stdc++.h>
using namespace std;
void pl(long long a) { printf("%lld\n", a); }
void pll(long long a, long long b) { printf("%lld %lld\n", a, b); }
void plll(long long a, long long b, long long c) {
  printf("%lld %lld %lld ", a, b, c);
}
void sss(string s) { cout << s, printf("\n"); }
long long string_to_ll(string s) {
  stringstream ss;
  ss << s;
  long long n;
  ss >> n;
  return n;
}
string ll_to_string(long long n) {
  stringstream ss;
  ss << n;
  string s;
  ss >> s;
  return s;
}
long long n, i, j, ara[100005], mx;
int main() {
  scanf("%lld", &n);
  ;
  for (long long i = (long long)0; i < (long long)n; i++)
    scanf("%lld", &ara[i]);
  ;
  for (i = n - 1; i >= 0; i--) {
    if (ara[i] > mx) {
      mx = ara[i];
      ara[i] = 0;
    } else
      ara[i] = mx - ara[i] + 1;
    mx = max(mx, ara[i]);
  }
  for (long long i = (long long)0; i < (long long)n; i++)
    cout << ara[i], printf(" ");
  printf("\n");
  return 0;
}
