#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int add(int a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  if (a < 0) a += MOD;
  return a;
}
int mul(int a, int b) { return a * 1ll * b % MOD; }
int binpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
vector<int> pr;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> c(n);
  for (int i = 0; i < int(n); i++) cin >> c[i];
  sort(c.begin(), c.end(), greater<int>());
  pr.push_back(0);
  for (int i = 0; i < int(n); i++) {
    pr.push_back(add(pr.back(), c[i]));
  }
  int invn = binpow(n, MOD - 2);
  for (int k = 1; k <= n; ++k) {
    int ans = 0;
    for (int i = 0, j = 0; i < n; i += k, ++j) {
      ans = add(ans, mul(j, add(pr[min(n, i + k)], -pr[i])));
    }
    cout << mul(ans, invn) << " ";
  }
  cout << "\n";
  return 0;
}
