#include <bits/stdc++.h>
using namespace std;
int conversion(string p) {
  int o;
  o = atoi(p.c_str());
  return o;
}
string toString(int h) {
  stringstream ss;
  ss << h;
  return ss.str();
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return (a * (b / gcd(a, b))); }
int toi(string p) {
  int x;
  istringstream in(p);
  in >> x;
  return x;
}
int main() {
  cin.sync_with_stdio(false);
  long long n, m, x, maxi = 0;
  cin >> n;
  vector<long long> M;
  map<long long, int> P;
  long long arr[n + 2];
  memset(arr, 0, sizeof arr);
  for (int i = 0; i < n; i++) {
    cin >> x;
    M.push_back(x);
    P[x]++;
  }
  for (int i = n - 1; i >= 0; i--) arr[i] = max(arr[i + 1], M[i]);
  for (int i = 0; i < n; i++) {
    if (arr[i] == M[i] && P[M[i]] == 1)
      cout << 0 << " ";
    else
      cout << (abs(arr[i] - M[i]) + 1LL) << " ";
    P[M[i]]--;
  }
}
