#include <bits/stdc++.h>
using namespace std;
long long exp(long long a, long long b, long long m) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return res;
}
void solve() {
  long long n;
  cin >> n;
  long long inf = 998244353;
  long long t[n + 1];
  for (long long i = 1; i <= n; i++) cin >> t[i];
  sort(t + 1, t + n + 1);
  reverse(t + 1, t + n + 1);
  t[0] = 0;
  for (long long i = 1; i <= n; i++) t[i] = (t[i] + t[i - 1]) % inf;
  for (long long k = 1; k <= n; k++) {
    long long sum = 0;
    for (long long div = 0, i = 1; i <= n; div++) {
      long long tadd = (t[min(n, i + k - 1)] - t[i - 1] + inf) % inf;
      tadd = (tadd * div) % inf;
      i = min(n + 1, i + k);
      sum = (sum + tadd) % inf;
    }
    sum = (sum * exp(n, inf - 2, inf)) % inf;
    cout << sum << " ";
  }
  cout << endl;
}
int main() {
  int q = 1;
  for (int i = 1; i <= q; i++) {
    solve();
  }
  return 0;
}
