#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A(n), M(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int maxi = -1;
  for (int i = n - 1; i >= 1; i--) {
    maxi = max(maxi, A[i]);
    M[i] = maxi;
  }
  vector<int> res;
  for (int i = 0; i < n - 1; i++) {
    res.push_back(max(M[i + 1] + 1 - A[i], 0));
  }
  res.push_back(0);
  for (int i = 0; i < n; i++) cout << res[i] << char(i + 1 == n ? 10 : 32);
}
