#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int sum(int a, int b) { return a + b >= MOD ? a + b - MOD : a + b; }
int sub(int a, int b) { return a - b < 0 ? a - b + MOD : a - b; }
int mul(int a, int b) { return (1LL * a * b) % MOD; }
int pw(int a, int b) {
  if (!b) return 1;
  int r = pw(a, b / 2);
  r = mul(r, r);
  if (b % 2) r = mul(r, a);
  return r;
}
const int MAXN = 3e5 + 7;
int v[MAXN];
int cu[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  sort(v + 1, v + n + 1);
  for (int i = 1; i <= n; i++) cu[i] = sum(cu[i - 1], v[i]);
  int _n = pw(n, MOD - 2);
  for (int k = 1; k <= n; k++) {
    int ans = 0;
    for (int i = n - k, j = 1; i > 0; i -= k, j++) {
      int biyog = 0;
      if (i - k > 0) biyog = cu[i - k];
      ans = sum(ans, mul(j, sub(cu[i], biyog)));
    }
    cout << mul(ans, _n) << " ";
  }
  cout << "\n";
  return 0;
}
