#include <bits/stdc++.h>
using namespace std;
template <class T>
int chkmax(T& a, T b) {
  if (b > a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
int chkmin(T& a, T b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class iterator>
void output(iterator begin, iterator end, ostream& out = cerr) {
  while (begin != end) {
    out << (*begin) << " ";
    begin++;
  }
  out << endl;
}
template <class T>
void output(T x, ostream& out = cerr) {
  output(x.begin(), x.end(), out);
}
void fast_io() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int MOD = 998244353;
int mul(int a, int b) { return (1LL * a * b) % MOD; }
int power(int a, int deg) {
  int res = 1;
  for (; deg; a = mul(a, a), deg >>= 1) {
    if (deg & 1) {
      res = mul(res, a);
    }
  }
  return res;
}
int inverse(int a) { return power(a, MOD - 2); }
const int mx = 3e5 + 228;
int n;
long long a[mx], pref[mx];
void read() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 0; i < n; ++i) {
    pref[i + 1] = pref[i] + a[i];
  }
}
void solve() {
  int inv_n = inverse(n);
  for (int m = 1; m <= n; ++m) {
    long long res = 0, it = 0;
    int sum = n - m;
    while (sum) {
      it++;
      int lst = min(m, sum);
      res += it * (pref[sum] - pref[sum - lst]);
      sum -= lst;
    }
    res %= MOD;
    cout << mul(res, inv_n) << '\n';
  }
}
signed main() {
  fast_io();
  read();
  solve();
}
