#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 1;
long long n, i, j, k, m;
long long dem = 0, tong = 0, x, y, z, l, r;
char k1, k2;
long long a[maxn], b[maxn], c[maxn], h[maxn];
long long d[maxn];
string s, s1, s2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (i = n; i >= 1; i--) {
    b[i] = max(a[i], b[i + 1]);
  }
  for (i = 1; i <= n; i++) {
    if (b[i] != a[i] || (b[i] == a[i] && a[i] == b[i + 1]))
      c[i] = b[i] - a[i] + 1;
    cout << c[i] << " ";
  }
}
