#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long power(long long a, long long n) {
  if (n == 0) return 1;
  if (n == 1) return a;
  long long squareRoot = power(a, n / 2);
  long long res = (squareRoot * squareRoot) % MOD;
  if (n % 2 == 1) {
    res = (res * a) % MOD;
  }
  return res;
}
long long pow(long long a, long long n) {
  long long ans = 1;
  while (n) {
    if (n % 2 == 1) {
      ans = (ans * a) % MOD;
    }
    a = (a * a) % MOD;
    n /= 2;
  }
  return ans;
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> c(n);
  for (long long i = 0; i < n; i++) {
    cin >> c[i];
  }
  sort(c.begin(), c.end(), greater<long long>());
  vector<long long> sums(n + 1, 0);
  for (long long i = 0; i < n; i++) {
    sums[i + 1] = sums[i] + c[i];
    if (sums[i + 1] >= MOD) sums[i + 1] -= MOD;
  }
  long long inverseN = pow(n, MOD - 2);
  const long long fullSum = sums[n];
  vector<long long> results(n);
  for (long long k = 1; k <= n; k++) {
    long long beginK = k;
    long long sum = 0;
    while (beginK < n) {
      sum = sum + fullSum - sums[beginK];
      if (sum >= MOD) sum -= MOD;
      if (sum < 0) sum += MOD;
      beginK += k;
    }
    results[k - 1] = (sum * inverseN) % MOD;
  }
  for (auto x : results) cout << x << " ";
  cout << "\n";
}
