#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int64_t sum = accumulate(A.begin(), A.end(), 0);
  for (int i = 0; i < N; i++) cout << sum - A[i] << endl;
  return 0;
}
