#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
namespace Fread {
const int SIZE = 1 << 20;
char buf[SIZE], *S, *T;
inline char getchar() {
  if (S == T) {
    T = (S = buf) + fread(buf, 1, SIZE, stdin);
    if (S == T) return EOF;
  }
  return *S++;
}
}  // namespace Fread
namespace Fwrite {
const int SIZE = 1 << 20;
char buf[SIZE], *S = buf, *T = buf + SIZE;
inline void flush() {
  fwrite(buf, 1, S - buf, stdout);
  S = buf;
}
inline void putchar(char c) {
  *S++ = c;
  if (S == T) flush();
}
struct _ {
  ~_() { flush(); }
} __;
}  // namespace Fwrite
template <typename T>
inline void read(T& x) {
  x = 0;
  int f = 1;
  char c = Fread::getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = Fread::getchar();
  }
  while (isdigit(c)) x = x * 10 + (c - '0'), c = Fread::getchar();
  x *= f;
}
template <typename T>
inline void write(T x, bool _enter = 0, bool _space = 0) {
  if (!x)
    Fwrite::putchar('0');
  else {
    if (x < 0) Fwrite::putchar('-'), x = -x;
    static char dig[41];
    int top = 0;
    while (x) dig[++top] = (x % 10) + '0', x /= 10;
    while (top) Fwrite::putchar(dig[top--]);
  }
  if (_enter) Fwrite::putchar('\n');
  if (_space) Fwrite::putchar(' ');
}
namespace Fastio {
struct reader {
  template <typename T>
  reader& operator>>(T& x) {
    ::read(x);
    return *this;
  }
  reader& operator>>(char& c) {
    c = Fread::getchar();
    while (c == '\n' || c == ' ') c = Fread::getchar();
    return *this;
  }
  reader& operator>>(char* str) {
    int len = 0;
    char c = Fread::getchar();
    while (c == '\n' || c == ' ') c = Fread::getchar();
    while (c != '\n' && c != ' ') str[len++] = c, c = Fread::getchar();
    str[len] = '\0';
    return *this;
  }
} cin;
const char endl = '\n';
struct writer {
  template <typename T>
  writer& operator<<(T x) {
    ::write(x, 0, 0);
    return *this;
  }
  writer& operator<<(char c) {
    Fwrite::putchar(c);
    return *this;
  }
  writer& operator<<(const char* str) {
    int cur = 0;
    while (str[cur]) Fwrite::putchar(str[cur++]);
    return *this;
  }
} cout;
}  // namespace Fastio
const int MOD = 998244353;
inline int mod1(int x) { return x < MOD ? x : x - MOD; }
inline int mod2(int x) { return x < 0 ? x + MOD : x; }
inline void add(int& x, int y) { x = mod1(x + y); }
inline void sub(int& x, int y) { x = mod2(x - y); }
inline int pow_mod(int x, int i) {
  int y = 1;
  while (i) {
    if (i & 1) y = (long long)y * x % MOD;
    x = (long long)x * x % MOD;
    i >>= 1;
  }
  return y;
}
const int MAXN = 3e5;
int n, a[MAXN + 5], sum[MAXN + 5];
int main() {
  Fastio::cin >> n;
  for (int i = 1; i <= n; ++i) {
    Fastio::cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; ++i) {
    sum[i] = mod1(a[i] + sum[i - 1]);
  }
  int inv_n = pow_mod(n, MOD - 2);
  for (int k = 1; k <= n; ++k) {
    int dist = 0;
    int res = 0;
    for (int i = 1; i <= n; i += k) {
      int j = min(n, i + k - 1);
      res =
          ((long long)res + (long long)dist * mod2(sum[j] - sum[i - 1])) % MOD;
      ++dist;
    }
    res = (long long)res * inv_n % MOD;
    Fastio::cout << res << " ";
  }
  Fastio::cout << Fastio::endl;
  return 0;
}
