#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma warning(disable : 4996)
using namespace std;
clock_t start_time, end_time;
void open() {
  ((void)0);
  ((void)0);
  ((void)0);
  ((void)0);
}
void close() {
  ((void)0);
  ((void)0);
}
const int MAX = 3e5 + 1;
const int MOD = 998244353;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos(-1);
const long double ERR = 1e-10;
const int move_r[] = {-1, 0, 1, 0, -1, -1, 1, 1};
const int move_c[] = {0, -1, 0, 1, -1, 1, -1, 1};
long long n, qinv, c[MAX], ans[MAX];
long long add(long long a, long long b) {
  long long ret = a + b;
  if (ret >= MOD) ret -= MOD;
  return ret;
}
long long mul(long long a, long long b) { return a * b % MOD; }
long long _pow(long long base, long long exp) {
  long long ret = 1LL;
  while (exp) {
    if (exp & 1) ret = mul(ret, base);
    base = mul(base, base);
    exp >>= 1;
  }
  return ret;
}
int main(int argc, char *argv[]) {
  open();
  scanf("%lld", &n);
  for (int i = 1; i <= n; ++i) scanf("%lld", c + i);
  sort(c + 1, c + n + 1);
  for (int i = 1; i <= n; ++i) c[i] = add(c[i], c[i - 1]);
  qinv = _pow(n, MOD - 2);
  for (int i = 1; i < n; ++i) {
    int k = n - i;
    ans[k] = c[i];
    for (int j = i % k; j < i; j += k) ans[k] = add(ans[k], c[j]);
    ans[k] = mul(ans[k], qinv);
  }
  for (int i = 1; i <= n; ++i) printf("%lld ", ans[i]);
  puts("");
  close();
  return 0;
}
