#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 50;
int data[maxn], answer[maxn] = {0};
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &data[i]);
  int high = data[n - 1];
  for (int i = n - 2; i >= 0; --i) {
    if (data[i] > high)
      high = data[i];
    else
      answer[i] = high - data[i] + 1;
  }
  printf("%d", answer[0]);
  for (int i = 1; i < n; ++i) printf(" %d", answer[i]);
  return 0;
}
