#include <bits/stdc++.h>
using namespace std;
void setIO(string name) {
  freopen((name + ".in").c_str(), "r", stdin);
  freopen((name + ".out").c_str(), "w", stdout);
}
long long inv(long long base, long long mod = 998244353) {
  if (base == 0) return mod;
  long long res = (1 - mod * inv(mod % base, base)) / base;
  return (res < 0) ? res + mod : res;
}
int N;
int c[300001];
long long pref[300001];
long long mod = 998244353ll;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  for (int i = 1; i < N + 1; i++) cin >> c[i];
  sort(c + 1, c + N + 1, greater<int>());
  for (int i = 1; i < N + 1; i++) pref[i] = (pref[i - 1] + c[i]) % mod;
  for (int k = 1; k < N + 1; k++) {
    long long score = 0;
    long long i;
    for (i = k; i <= N; i += k) {
      score += (pref[i] - pref[i - k] + mod) * (i / k - 1) % mod;
      if (score > mod) score -= mod;
    }
    score +=
        (i + k > N) ? (pref[N] - pref[i - k] + mod) * (i / k - 1) % mod : 0;
    if (score > mod) score -= mod;
    score *= inv(N);
    score %= mod;
    cout << score << " ";
  }
  return 0;
}
