#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int h[n], freq[n], mflr = 0;
  for (int i = 0; i < n; i++) scanf("%d", &h[i]);
  for (int i = n - 1; i >= 0; i--) {
    if (h[i] > mflr) {
      freq[i] = 0;
      mflr = h[i];
    } else
      freq[i] = mflr + 1 - h[i];
  }
  for (int i = 0; i < n; i++) printf("%d ", freq[i]);
  printf("\n");
  return 0;
}
