#include <bits/stdc++.h>
using namespace std;
int a[100005];
int suff[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = n; i >= 1; i--) {
    suff[i] = max(suff[i + 1], a[i]);
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", max(0, suff[i + 1] - a[i] + 1));
  }
}
