#include <bits/stdc++.h>
const int N = 1e6 + 5;
const int mod = 998244353;
using namespace std;
int n, inv, c[N], sum[N], ans;
template <typename T>
inline T read() {
  T x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * w;
}
int fpow(int x, int y) {
  int res = 1;
  for (; y; y >>= 1, x = 1ll * x * x % mod)
    if (y & 1) res = 1ll * res * x % mod;
  return res;
}
bool cmp(int a, int b) { return a > b; }
int main() {
  n = read<int>(), inv = fpow(n, mod - 2);
  for (int i = 1; i <= n; i++) c[i] = read<int>();
  sort(c + 1, c + n + 1, cmp);
  for (int i = 1; i <= n; i++) sum[i] = (sum[i - 1] + c[i]) % mod;
  for (int pos, x, i = 1; i <= n; i++) {
    ans = 0, pos = i + 1, x = 1;
    while (pos <= n) {
      if (pos + i <= n) {
        ans = (1ll * x * (sum[pos + i - 1] - sum[pos - 1] + mod) + ans) % mod,
        x++, pos += i;
      } else {
        ans = (1ll * x * (sum[n] - sum[pos - 1] + mod) + ans) % mod;
        break;
      }
    }
    printf("%lld%c", 1ll * ans * inv % mod, i == n ? '\n' : ' ');
  }
  return 0;
}
