#include <bits/stdc++.h>
using namespace std;
int main() {
  int house;
  cin >> house;
  int *floor = (int *)malloc(sizeof(int) * house);
  int *added = (int *)malloc(sizeof(int) * house);
  fill(added, added + house, 0);
  for (int i = 0; i < house; i++) cin >> floor[i];
  int max = floor[house - 1];
  for (int i = house - 2; i >= 0; i--)
    if (floor[i] <= max)
      added[i] = max - floor[i] + 1;
    else
      max = floor[i];
  for (int i = 0; i < house; i++) cout << added[i] << ' ';
  cout << endl;
  return 0;
}
