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