#include <bits/stdc++.h>
using namespace std;
int x;
int main() {
  scanf("%i", &x);
  int *A1 = new int[x];
  for (int i = 0; i < x; i++) scanf("%i", &A1[i]);
  int mx = A1[x - 1], sum = 0;
  vector<int> A2;
  A2.push_back(0);
  for (int i = x - 2; i > -1; i--) {
    A2.push_back(max(0, mx - A1[i] + 1));
    mx = max(mx, A1[i]);
  }
  for (int i = A2.size() - 1; i > -1; i--) printf("%i ", A2[i]);
  return 0;
}
