#include <bits/stdc++.h>
using namespace std;
int main() {
  int no_of_houses;
  cin >> no_of_houses;
  vector<int> floors;
  vector<int> lux_floors;
  int max_height = 0;
  int temp;
  for (int i = 0; i < no_of_houses; i++) {
    cin >> temp;
    floors.push_back(temp);
  }
  for (int i = no_of_houses - 1; i >= 0; i--) {
    if (floors[i] > max_height) {
      max_height = floors[i];
      lux_floors.push_back(0);
      continue;
    }
    temp = (0 > max_height + 1 - floors[i]) ? 0 : max_height + 1 - floors[i];
    lux_floors.push_back(temp);
  }
  for (int i = no_of_houses - 1; i >= 0; i--) {
    cout << lux_floors[i];
    if (i != 0) {
      cout << " ";
    }
  }
  cout << endl;
  return 0;
}
