#include <bits/stdc++.h>
using namespace std;
int read() {
  int p = 0, q = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch == '-' ? q = -1 : 0, ch = getchar();
  while (ch >= '0' && ch <= '9') p = p * 10 + ch - '0', ch = getchar();
  return p * q;
}
long long readll() {
  long long p = 0, q = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch == '-' ? q = -1 : 0, ch = getchar();
  while (ch >= '0' && ch <= '9') p = p * 10 + ch - '0', ch = getchar();
  return p * q;
}
bool cmp(int x, int y) { return x > y; }
int power(long long a, int b) {
  long long c = 1;
  while (b) {
    if (b & 1) c = c * a % 998244353;
    a = a * a % 998244353;
    b >>= 1;
  }
  return c;
}
int n, a[300005], pre[300005];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + 1 + n, cmp);
  for (int i = 1; i <= n; i++) pre[i] = (pre[i - 1] + a[i]) % 998244353;
  for (int k = 1; k <= n; k++) {
    int low = (n - k) / k;
    long long ans = 0;
    for (int j = 1; j <= low; j++)
      ans = (ans + 1ll * (pre[(j + 1) * k] - pre[j * k]) * j) % 998244353;
    ans = (ans + 1ll * (pre[n] - pre[low * k + k]) * (low + 1)) % 998244353;
    printf("%I64d%s",
           (ans * power(n, 998244353 - 2) % 998244353 + 998244353) % 998244353,
           k == n ? "\n" : " ");
  }
  return 0;
}
