#include <bits/stdc++.h>
using namespace std;
int a[100010];
int m[100010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long k;
    scanf("%lld", &k);
    a[i] = k;
  }
  m[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    m[i] = max(m[i + 1], a[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > m[i + 1]) {
      cout << 0 << " ";
    } else {
      cout << m[i + 1] - a[i] + 1 << " ";
    }
  }
  cout << 0 << endl;
  return 0;
}
