#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
int ar[maxn], br[maxn];
int n, ans, cns, MAX, MIN;
int main() {
  while (cin >> n) {
    memset(br, 0, sizeof(br));
    for (int i = 0; i < n; i++) scanf("%d", &ar[i]);
    MAX = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (MAX < ar[i]) {
        MAX = ar[i];
        continue;
      } else {
        br[i] = MAX - ar[i] + 1;
      }
    }
    printf("%d", br[0]);
    for (int i = 1; i < n; i++) printf(" %d", br[i]);
    printf("\n");
  }
  return 0;
}
