#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
long long n, c[300010], sum[300010], ans, inv;
const long long mod = 998244353;
inline long long qpow(long long x, int k) {
  long long res = 1;
  while (k) {
    if (k & 1) res = res * x % mod;
    x = x * x % mod;
    k >>= 1;
  }
  return res;
}
int main() {
  n = read();
  inv = qpow(n, mod - 2);
  for (int i = 1; i <= n; i++) c[i] = read();
  sort(c + 1, c + n + 1);
  for (int i = 1; i <= n; i++) sum[i] = (sum[i - 1] + c[i]) % mod;
  for (int k = 1; k <= n; k++) {
    ans = 0;
    for (int i = n % k; i <= n - k; i += k) ans = (ans + sum[i]) % mod;
    printf("%lld ", ans * inv % mod);
  }
  return 0;
}
