#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 100;
int a[MAX], ma, ans[MAX];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n - 1; i >= 0; i--)
    ans[i] = max(0, ma - a[i] + 1), ma = max(ma, a[i]);
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
}
