#include <bits/stdc++.h>
const int mod = 1E9 + 7;
const int intmax = 1E9 + 7;
using namespace std;
int aa[100005];
int bb[100005];
int main() {
  ios::sync_with_stdio(0);
  int test, a, b, c;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> aa[i];
  bb[n - 1] = aa[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    bb[i] = max(aa[i], bb[i + 1]);
  }
  for (int i = 0; i < n - 1; i++) {
    if (aa[i] <= bb[i + 1]) {
      cout << bb[i] - aa[i] + 1 << " ";
    } else
      cout << "0"
           << " ";
  }
  cout << "0";
  return 0;
}
