#include <bits/stdc++.h>
using namespace std;
long double PI = 3.14159265359;
long long inf = 1000000000000000007;
long long mod = 1000000007;
long long mod1 = 998244353;
const bool multi = 0;
long long c[300007];
long long pref[300007];
long long pot(long long x, long long p) {
  long long res = 1;
  for (; p; p >>= 1) {
    if (p & 1) res = res * x % mod;
    x = x * x % mod;
  }
  return res;
}
signed main() {
  mod = mod1;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tt;
  if (multi)
    cin >> tt;
  else
    tt = 1;
  while (tt--) {
    long long n;
    cin >> n;
    for (long long i = 1; i <= n; i++) cin >> c[i];
    sort(c + 1, c + n + 1, greater<long long>());
    for (long long i = 1; i <= n; i++) pref[i] = pref[i - 1] + c[i];
    long long inv = pot(n, mod - 2);
    for (long long k = 1; k <= n; k++) {
      long long sum = 0;
      for (long long i = k + 1, s = 1; i <= n; i += k, s++)
        sum = (sum + (pref[min(n, i + k - 1)] - pref[i - 1]) % mod * s) % mod;
      cout << sum * inv % mod << " ";
    }
  }
  return 0;
}
