#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353, N = 300300;
long long power(long long base, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * base % mod;
    base = base * base % mod;
    b >>= 1;
  }
  return ret;
}
int n, a[N];
long long sum[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &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]) % mod;
  long long inv = power(n, mod - 2);
  for (int k = 1; k <= n; ++k) {
    long long ans = 0;
    for (int num = 0, i = 0; i < n; ++num, i += k) {
      ans = (ans + 1LL * num * (sum[min(n, i + k)] - sum[i] + mod) % mod) % mod;
    }
    printf("%lld ", ans * inv % mod);
  }
  return 0;
}
