#include <bits/stdc++.h>
using namespace std;
const int limit = 550;
const int MOD = 998244353;
int N;
int C[300005], Partial[300005];
int norm(int x) { return x >= MOD ? x - MOD : x; }
void Read() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d", &C[i]);
  sort(C + 1, C + N + 1);
  reverse(C + 1, C + N + 1);
  for (int i = N; i >= 1; i--) Partial[i] = norm(Partial[i + 1] + C[i]);
}
int power(int n, int p) {
  int sol = 1;
  while (p) {
    if (p & 1) sol = (1LL * sol * n) % MOD;
    p /= 2;
    n = (1LL * n * n) % MOD;
  }
  return sol;
}
void Solve() {
  int inv = power(N, MOD - 2);
  for (int k = 1; k <= N; k++) {
    int ans = 0;
    for (int i = k + 1; i <= N; i += k) {
      ans = norm(ans + Partial[i]);
    }
    printf("%d ", (1LL * ans * inv) % MOD);
  }
  printf("\n");
}
int main() {
  Read();
  Solve();
  return 0;
}
