#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b, long long &x, long long &y) {
  if (!a) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  int d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
int main() {
  const int N = 998244353;
  int n, c, t;
  long long sum, ch, l, a;
  vector<long long> v;
  cin >> n;
  v.push_back(0);
  for (int i = 0; i < n; ++i) {
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  long long f;
  gcd(n, N, ch, f);
  ch = (ch % N + N) % N;
  for (int i = 1; i <= n; ++i) {
    v[i] = (v[i] + v[i - 1]) % N;
  }
  for (int k = 1; k <= n; ++k) {
    sum = c = t = l = 0;
    int p, q;
    p = k;
    q = n % k;
    sum += v[q];
    l = n / k - 1;
    while (t < l) {
      sum += v[p + q];
      sum %= N;
      p += k;
      t++;
    }
    cout << sum * ch % N << " ";
  }
}
