#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = 998244353;
const double eps = 1e-9;
const double pi = acos(-1.0);
int n, c[300300];
int ans[300300];
long long pr[300300];
int binpow(int a, int k) {
  if (k == 0) return 1;
  if (a == 0) return 0;
  int ans = binpow(a, k / 2);
  ans = 1ll * ans * ans % mod;
  if (k % 2) ans = 1ll * ans * a % mod;
  return ans;
}
int inv(int a) {
  if (a == 0) return 0;
  return binpow(a, mod - 2);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", c + i);
  sort(c, c + n);
  pr[0] = c[0];
  for (int i = 1; i < n; i++) {
    pr[i] = pr[i - 1] + c[i];
  }
  int k = 0;
  while (k * k <= n) k++;
  k--;
  int I = inv(n);
  for (int i = 1; i <= n; i++) {
    ans[i] = 0;
    for (int j = n - i - 1; j >= 0; j -= i) {
      ans[i] = (ans[i] + pr[j]) % mod;
    }
    ans[i] = ans[i] * 1ll * I % mod;
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
