#include <bits/stdc++.h>
using namespace std;
const long long N = 500777;
long long n, m;
long long M = 998244353;
long long a[N];
long long pref[N];
long long b[N];
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n)
    if (n & 1) {
      res *= a;
      --n;
      res %= M;
    } else {
      a *= a;
      a %= M;
      n >>= 1;
    }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  for (long long i = 1; i <= n; i++) {
    b[i] = a[n - i + 1];
  }
  for (long long i = 1; i <= n; i++) {
    a[i] = b[i];
  }
  long long del = binpow(n, M - 2);
  for (long long i = 1; i <= n; i++) {
    pref[i] = pref[i - 1] + a[i];
  }
  for (long long k = 1; k <= n; k++) {
    long long ans = 0;
    for (long long i = 1; i * k <= n; i++) {
      ans = ans + (i - 1) * (pref[i * k] - pref[(i - 1) * k]);
      ans %= M;
    }
    long long kk = n / k;
    ans = ans + kk * (pref[n] - pref[kk * k]);
    ans %= M;
    ans *= del;
    ans %= M;
    cout << ans << " ";
  }
}
