#include <bits/stdc++.h>
using namespace std;
long long root(long long n) {
  long long ans = 1;
  while (1) {
    if (ans * ans > n) {
      return ans - 1;
      break;
    } else if (ans * ans == n) {
      return ans;
      break;
    } else {
      ans += 1;
    }
  }
}
int main() {
  long long n, i, max;
  cin >> n;
  long long array[n], dp[n];
  for (i = 0; i < n; i++) cin >> array[i];
  dp[n - 1] = 0;
  max = array[n - 1];
  for (i = n - 1; i > 0; i--) {
    if (max < array[i - 1]) {
      max = array[i - 1];
      dp[i - 1] = 0;
    } else if (max == array[i - 1]) {
      dp[i - 1] = 1;
    } else {
      dp[i - 1] = max - array[i - 1] + 1;
    }
  }
  cout << endl;
  for (i = 0; i < n; i++) {
    cout << dp[i] << " ";
  }
  return 0;
}
