#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int mod = 1000000007;
const double eps = 0.0000000001;
void solution() {
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<int> dp(n + 1, 0);
  dp[n] = a[n];
  for (int i = n - 1; i >= 1; i--) {
    dp[i] = max(dp[i + 1], a[i]);
  }
  for (int i = 1; i <= n - 1; i++) {
    cout << max(dp[i + 1] - a[i] + 1, 0) << " ";
  }
  cout << 0 << "\n";
}
void include_file() {}
int main() {
  include_file();
  solution();
  return 0;
}
