#include <bits/stdc++.h>
using namespace std;
int n, h[200000], a[200000];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> h[i];
  for (int i = n - 1; i >= 0; i--) a[i] = max(a[i + 1], h[i + 1]);
  for (int i = 0; i < n; i++) cout << max(a[i] - h[i] + 1, 0) << ' ';
  return 0;
}
