#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7, M = 998244353;
int a[N];
long long sum[N];
long long inv(int x) {
  long long ans = 1;
  while (ans % x != 0) ans += M;
  return (ans / x) % M;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  long long invn = inv(n);
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) sum[i] = (sum[i - 1] + a[i]) % M;
  for (int k = 1; k <= n; k++) {
    long long ans = 0;
    int done = 0;
    for (int j = 0; j < n / k; j++) {
      ans = (ans + (sum[done + k] - sum[done]) * j) % M;
      done += k;
    }
    ans = (ans + (sum[n] - sum[done]) * (n / k)) % M;
    ans = (ans + M) % M;
    ans = (ans * invn) % M;
    cout << ans << " ";
  }
}
