#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int mul(int a, int b) { return (long long)a * b % mod; }
int add(int a, int b) {
  int res = (long long)a + b;
  if (res < 0)
    res += mod;
  else if (res > mod)
    res -= mod;
  return res;
}
int bpow(int x, int p) {
  int res = 1;
  while (p) {
    if (p & 1) res = mul(res, x);
    p >>= 1;
    if (p) x = mul(x, x);
  }
  return res;
}
int inv(int x) { return bpow(x, mod - 2); }
void solve() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.rbegin(), a.rend());
  vector<long long> pref(n + 1);
  for (int i = 1; i <= n; i++) {
    pref[i] = pref[i - 1] + a[i - 1];
  }
  int iv = inv(n);
  for (int i = 1; i <= n; i++) {
    int cur = 0;
    for (int j = 0, k = 0; j < n; j += i, k++) {
      long long sum = pref[min(j + i, n)] - pref[j];
      sum %= mod;
      cur = add(cur, mul(sum, k));
    }
    cout << mul(cur, iv) << ' ';
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  for (; q > 0; q--) {
    solve();
  }
}
