#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int bm(int b, int p, int m) {
  if (p == 0) return 1;
  int t = bm(b, p / 2, m);
  t = 1ll * t * t % m;
  if (p & 1) return 1ll * t * b % m;
  return t;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> c(n + 1);
  c[0] = 1e9;
  for (int i = 1; i <= n; i++) cin >> c[i];
  sort(c.rbegin(), c.rend());
  c[0] = 0;
  for (int i = 1; i <= n; i++) c[i] += c[i - 1];
  int q = bm(n, mod - 2, mod);
  for (int k = 1; k <= n; k++) {
    int p = 0;
    for (int i = k + 1, j = 1; i <= n; i += k, j++) {
      long long s = c[min(i + k - 1, n)] - c[i - 1];
      s %= mod;
      p += 1ll * s * j % mod;
      p %= mod;
    }
    p = 1ll * p * q % mod;
    cout << p << " ";
  }
  return 0;
}
