#include <bits/stdc++.h>
using namespace std;
const int maxn = 200009;
const int MOD = 998244353;
int main() {
  ios_base::sync_with_stdio(false), cout.tie(0), cin.tie(0);
  int n;
  cin >> n;
  vector<int64_t> A(n + 1), S(n + 1), Ans(n + 1);
  for (int i = 1; i <= n; ++i) cin >> A[i];
  sort(A.begin() + 1, A.end(), [](int64_t a, int64_t b) { return a > b; });
  for (int i = 1; i <= n; ++i) S[i] += S[i - 1] + A[i];
  for (int i = 1; i <= n; ++i) {
    for (int j = 1, a = 0; j <= n; j += i, ++a) {
      (Ans[i] += (S[min(j + i - 1, n)] - S[j - 1]) * a % MOD) %= MOD;
    }
  }
  int64_t invn = 1, p = MOD - 2, a = n;
  while (p) {
    if (p & 1ll) invn = invn * a % MOD;
    a = a * a % MOD;
    p >>= 1;
  }
  for (int i = 1; i <= n; ++i) cout << Ans[i] * invn % MOD << " ";
  cout << '\n';
  return 0;
}
