#include <bits/stdc++.h>
using namespace std;
const long long N = 998244353;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long binpow(long long a, int n) {
  if (!n) return 1;
  if (n % 2) return binpow(a, n - 1) * a % N;
  long long bp = binpow(a, n / 2);
  return bp * bp % N;
}
void solve() {
  int n;
  cin >> n;
  vector<long long> c(n), d(n + 1);
  for (int i = 0; i < n; ++i) cin >> c[i];
  sort(c.begin(), c.end());
  for (int i = 1; i <= n; ++i) {
    d[i] = (d[i - 1] + c[i - 1]) % N;
  }
  vector<long long> ans(n);
  for (int i = 0; i < n - 1; ++i) {
    for (int j = n - i - 1; j > -1; j -= i + 1) {
      ans[i] += d[j];
    }
    ans[i] %= N;
  }
  long long rev = binpow(n, N - 2);
  for (int i = 0; i < n; ++i) {
    cout << ans[i] * rev % N << " ";
  }
  cout << endl;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
