#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
#pragma GCC optimize("03")
using namespace std;
long long qp(long long b, long long e) {
  if (!e) return 1;
  long long x = qp(b, e / 2);
  x = (x * x) % (long long)(998244353);
  if (e & 1) x = (x * b) % (long long)(998244353);
  return x;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> a(n);
  vector<long long> ac(n + 1);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort((a).begin(), (a).end());
  for (int i = 0; i < n; i++) {
    ac[i + 1] = ac[i] + a[i];
    ac[i + 1] %= (long long)(998244353);
  }
  for (int i = 1; i <= n; i++) {
    long long res = 0;
    int pos = n - i;
    long long mul = 1;
    while (pos) {
      if (pos - i >= 0) {
        res = (res + (mul) * (ac[pos] - ac[pos - i])) % (long long)(998244353);
        mul++;
        pos -= i;
      } else {
        res = (res + (mul) * (ac[pos] - ac[0])) % (long long)(998244353);
        mul++;
        pos = 0;
      }
    }
    cout << (res * qp(n, (long long)(998244353) - 2)) % (long long)(998244353)
         << ' ';
  }
  cout << '\n';
  return 0;
}
