#include <bits/stdc++.h>
using namespace std;
int qpow(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = (long long)ret * a % 998244353;
    a = (long long)a * a % 998244353;
    b >>= 1;
  }
  return ret;
}
int a[303030], b[303030];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n, [](int a, int b) { return a > b; });
  partial_sum(a, a + n, b + 1,
              [](int a, int b) { return (a + b) % 998244353; });
  int inv = qpow(n, 998244353 - 2);
  for (int k = 1; k <= n; k++) {
    int ans = 0;
    for (int i = 0, j = 0; i < n; i += k, j++)
      ans = (ans +
             (long long)j * (b[min(i + k, n)] - b[i] + 998244353) % 998244353) %
            998244353;
    printf("%lld ", (long long)ans * inv % 998244353);
  }
  return 0;
}
