#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const long long INF = 1LL << 62;
const long long MINF = -(1LL << 62);
template <typename T>
T getint() {
  T val = 0;
  char c;
  bool neg = false;
  while ((c = getchar()) && !(c >= '0' && c <= '9')) {
    neg |= c == '-';
  }
  do {
    val = (val * 10) + c - '0';
  } while ((c = getchar()) && (c >= '0' && c <= '9'));
  return val * (neg ? -1 : 1);
}
const long long mod = 998244353;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> t(n);
  vector<long long> pre(n);
  for (int i = 0; i < n; ++i) {
    cin >> t[i];
  }
  sort((t).begin(), (t).end());
  for (int i = 0; i < n; ++i) {
    pre[i] += (i ? pre[i - 1] : 0) + t[i];
  }
  auto sum = [&](int i, int j) -> long long {
    return (pre[j] - (i > 0 ? pre[i - 1] : 0)) % mod;
  };
  long long div = 1;
  long long akt = n;
  long long exp = mod - 2;
  while (exp) {
    if (exp & 1) {
      div *= akt;
      div %= mod;
    }
    akt = akt * akt % mod;
    exp /= 2;
  }
  for (int i = 1; i <= n; ++i) {
    long long curr = 0, coef = 1;
    for (int j = n - i - 1; j >= 0; j -= i) {
      curr += coef * sum(j - i + 1, j);
      curr %= mod;
      coef++;
    }
    cout << curr * div % mod << " ";
  }
  cout << "\n";
  return 0;
}
