#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000005;
const int mod = 998244353;
int a[maxn];
long long s[maxn];
long long inv(long long a, long long m) {
  if (a == 1) return 1;
  return inv(m % a, m) * (m - m / a) % m;
}
int main() {
  int n;
  long long tot = 0;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
  }
  sort(a + 1, a + n + 1);
  s[0] = 0;
  for (int i = 1; i <= n; ++i) {
    tot += a[i];
    tot %= mod;
    s[i] = tot;
  }
  const long long invn = inv(n, mod);
  for (int i = 1; i <= n; ++i) {
    int j = n - i;
    long long ans = 0;
    int t = 1;
    int pre = n - i;
    for (j -= i; j >= 0; j -= i) {
      ans += (s[pre] - s[j] + mod) * 1ll * t % mod;
      ans %= mod;
      pre = j;
      t++;
    }
    ans += (s[pre] - s[0] + mod) * 1ll * t % mod;
    ans %= mod;
    cout << ans * invn % mod << endl;
  }
}
