#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m[100000], mn[100000], mx;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> m[i];
  reverse(m, m + n);
  mn[0] = 0, mx = m[0];
  for (int i = 1; i < n; i++)
    if (m[i] > mx)
      mn[i] = 0, mx = m[i];
    else
      mn[i] = mx - m[i] + 1;
  for (int i = n - 1; i > -1; --i) cout << mn[i] << ' ';
  return 0;
}
