#include <bits/stdc++.h>
const int MAX_N = 300000;
const int MOD = 998244353;
int v[1 + MAX_N], sp[1 + MAX_N];
int lgput(int b, int e) {
  int ac = 1;
  while (e > 0) {
    if (e % 2 == 1) ac = (long long)ac * b % MOD;
    b = (long long)b * b % MOD;
    e /= 2;
  }
  return ac;
}
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) scanf("%d", &v[i]);
  std::sort(v + 1, v + 1 + N);
  for (int i = 1; i <= N; ++i) sp[i] = (sp[i - 1] + v[i]) % MOD;
  int invn = lgput(N, MOD - 2);
  for (int k = 1; k <= N; ++k) {
    int rem = (N - k) % k;
    int sizecomplete = (N - k) / k;
    int last = 0, coef = 0;
    if (rem > 0) ++coef;
    coef += sizecomplete;
    int res = 0;
    if (rem > 0) {
      res = ((long long)sp[rem] * coef + res) % MOD;
      last += rem;
      coef--;
    }
    while (coef > 0) {
      res = ((long long)(sp[last + k] + MOD - sp[last]) * coef + res) % MOD;
      last += k;
      --coef;
    }
    printf("%d ", (long long)res * invn % MOD);
  }
  return 0;
}
