#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using ld = long double;
using pii = pair<int, int>;
const ll M = 998244353;
inline ll sum(int l, int r, vector<ll> &s) { return s[r] - (l ? s[l - 1] : 0); }
ll binpow(ll a, ll n) {
  ll ans = 1;
  a %= M;
  while (n) {
    if (n & 1) ans = (ans * a) % M;
    a = (a * a) % M;
    n >>= 1;
  }
  return ans;
}
void solve() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  vector<ll> s = a;
  for (int i = 1; i < n; i++) s[i] += s[i - 1];
  vector<ll> ans(n);
  for (int k = 1; k < n; k++)
    for (int i = 0; i * k < n; i++)
      ans[k - 1] += i * sum(i * k, min(i * k + k - 1, n - 1), s);
  ll invN = binpow(n, M - 2);
  for (int i = 0; i < n; i++)
    ans[i] %= M, ans[i] = (ans[i] * invN) % M, cout << ans[i] << " ";
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
