#include <bits/stdc++.h>
using namespace std;
long long h[100010], a[100010];
int main() {
  int n;
  while (cin >> n) {
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; ++i) cin >> h[i];
    a[n - 1] = 0;
    if (n > 1) a[n - 2] = h[n - 1];
    for (int i = n - 3; i >= 0; --i) {
      a[i] = max(a[i + 1], h[i + 1]);
    }
    bool f = false;
    for (int i = 0; i < n; ++i) {
      if (a[i] >= h[i]) {
        if (!f) {
          cout << a[i] - h[i] + 1;
          f = true;
        } else
          cout << " " << a[i] - h[i] + 1;
      } else {
        if (!f) {
          cout << "0";
          f = true;
        } else
          cout << " 0";
      }
    }
    cout << endl;
  }
  return 0;
}
