#include <bits/stdc++.h>
using namespace std;
int N;
int C[303030];
signed long long S[303030];
const signed long long mo = 998244353;
signed long long modpow(signed long long a, signed long long n = mo - 2) {
  signed long long r = 1;
  a %= mo;
  while (n) r = r * ((n % 2) ? a : 1) % mo, a = a * a % mo, n >>= 1;
  return r;
}
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> N;
  for (i = 0; i < (N); i++) cin >> C[i];
  sort(C, C + N);
  for (i = 0; i < (N); i++) S[i + 1] = S[i] + C[i];
  signed long long re = modpow(N);
  for (i = 1; i < N; i++) {
    int lef = N - i;
    int cur = 1;
    signed long long sum = 0;
    while (lef) {
      int num = min(lef, i);
      (sum += (S[lef] - S[lef - num]) % mo * cur) %= mo;
      lef -= num;
      cur++;
    }
    cout << sum * re % mo << " ";
  }
  cout << 0 << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  cout.tie(0);
  solve();
  return 0;
}
