#include <bits/stdc++.h>
using namespace std;
int N = (int)1e5 + 1;
int main() {
  std::ios::sync_with_stdio(0);
  long long int n;
  cin >> n;
  long long int a[n], max[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int ma = a[n - 1];
  max[n - 1] = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] > ma) {
      max[i] = a[i];
      ma = a[i];
    } else if (ma == a[i])
      max[i] = -1;
    else
      max[i] = ma;
  }
  for (int i = 0; i < n; i++) {
    if (max[i] == -1)
      cout << "1\n";
    else if (a[i] != max[i])
      cout << max[i] - a[i] + 1 << " ";
    else
      cout << "0 ";
  }
  return 0;
}
