#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n;
  long long a[100005], high = 0, temp;
  std::cin >> n;
  for (i = 0; i < n; i++) {
    std::cin >> a[i];
  }
  for (i = n - 1; i >= 0; i--) {
    temp = a[i];
    a[i] = max(0LL, high + 1 - a[i]);
    high = max(temp, high);
  }
  for (i = 0; i < n; i++) {
    std::cout << a[i] << " ";
  }
  return 0;
}
