#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  scanf("%d", &x);
  int arr[x];
  for (int i = 0; i < x; i++) {
    scanf("%d", &arr[i]);
  }
  int maxi = arr[x - 1];
  vector<int> v;
  v.push_back(0);
  for (int i = x - 2; i >= 0; i--) {
    if (arr[i] <= maxi) {
      v.push_back(maxi - arr[i] + 1);
    } else {
      v.push_back(0);
      maxi = arr[i];
    }
  }
  reverse(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
