#include <bits/stdc++.h>
using namespace std;
long long binpow(int b, int e) {
  long long sol = 1;
  while (e) {
    if (e & 1) sol = (sol * b) % 998244353;
    b = (1LL * b * b) % 998244353;
    e >>= 1;
  }
  return sol % 998244353;
}
int n;
vector<long long> sp;
int main() {
  cin >> n;
  long long INV = binpow(n, 998244353 - 2);
  sp.resize(n + 1);
  for (int i = 1; i <= n; ++i) {
    cin >> sp[i];
  }
  sort(sp.begin() + 1, sp.end(), greater<long long>());
  for (int i = 1; i <= n; ++i) {
    sp[i] += sp[i - 1];
  }
  for (int k = 1; k <= n; ++k) {
    int i, j;
    long long sol = 0;
    for (i = k, j = 0; i <= n; i += k, j++) {
      sol = (sol + (sp[i] - sp[i - k]) * j) % 998244353;
    }
    i -= k;
    sol = (sol + (sp[n] - sp[i]) * j) % 998244353;
    sol = sol * INV % 998244353;
    cout << sol << " ";
  }
  return 0;
}
