#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e11 + 5;
const int MAX = 1e5 + 10;
int arr[MAX], answer[MAX];
int main() {
  int t;
  scanf("%d", &t);
  for (int i = 0; i < t; ++i) scanf("%d", &arr[i]);
  int ttl = -1;
  for (int i = t - 1; i >= 0; --i) {
    if (arr[i] > ttl)
      answer[i] = 0;
    else
      answer[i] = ttl - arr[i] + 1;
    ttl = max(ttl, arr[i]);
  }
  for (int i = 0; i < t; ++i) printf("%d ", answer[i]);
  return 0;
}
