#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long a[300010], pre[300010];
long long mpow(long long a, long long b) {
  if (b == 1) return a % ((long long)998244353);
  if (b == 0) return 1;
  long long m = (b / 2);
  long long tem = mpow(a, m);
  if (b & 1)
    return (((tem * tem) % ((long long)998244353)) * a) %
           ((long long)998244353);
  else
    return (tem * tem) % ((long long)998244353);
}
long long add(long long a, long long b) {
  return ((a + b >= ((long long)998244353) ? a + b - ((long long)998244353)
                                           : a + b));
}
long long sub(long long a, long long b) {
  return (a >= b ? a - b : a + ((long long)998244353) - b);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n, greater<long long>());
  pre[0] = 0;
  for (long long i = 0; i < n; i++) pre[i + 1] = add(pre[i], a[i]);
  for (long long i = 1; i < n + 1; i++) {
    long long s = 0;
    for (long long j = 0; j < (((n - i) + (i)-1) / (i)); j++) {
      s = add(
          s, ((j + 1) * sub(pre[i + min((j + 1) * i, n - i)], pre[i + j * i])) %
                 ((long long)998244353));
    }
    s = (s * mpow(n, ((long long)998244353) - 2) % ((long long)998244353));
    cout << s << " ";
  }
  cout << '\n';
  return 0;
}
