#include <bits/stdc++.h>
long long maximum(long long a, long long b) { return a > b ? a : b; }
long long minimum(long long a, long long b) { return a < b ? a : b; }
long long absolute(long long a) { return a < 0 ? -a : a; }
template <class T>
void print_array(T* arr, long long n) {
  for (long long i = 0; i < n; i++) {
    std::cout << arr[i] << " ";
  }
  std::cout << std::endl;
  return;
}
template <class T>
void print_vector(std::vector<T> vec) {
  long long n = vec.size();
  for (long long i = 0; i < n; i++) {
    std::cout << vec[i] << " ";
  }
  std::cout << std::endl;
  return;
}
long long mod_exp(long long b, long long e, long long m) {
  long long a = 1;
  b = b % m;
  while (e) {
    if (e & 1) {
      a = (a * b) % m;
    }
    b = (b * b) % m;
    e >>= 1;
  }
  return a % m;
}
long long mod_inv(long long b) { return mod_exp(b, 998244353 - 2, 998244353); }
long long get_prefix_sum(std::vector<long long>& prefixsum, long long i,
                         long long n) {
  if (i < 0) {
    return 0;
  }
  return prefixsum[minimum(i, n - 1)];
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(NULL);
  std::cout.tie(NULL);
  long long n;
  std::cin >> n;
  long long invn = mod_inv(n) % 998244353;
  std::vector<long long> arr(n, 0), prefixsum(n, 0);
  for (long long i = 0; i < n; i++) {
    std::cin >> arr[i];
  }
  std::sort(arr.begin(), arr.end(), std::greater<long long>());
  prefixsum[0] = arr[0];
  for (long long i = 1; i < n; i++) {
    prefixsum[i] = prefixsum[i - 1] + arr[i];
  }
  long long sum = 0;
  for (long long k = 1; k <= n; k++) {
    sum = 0;
    for (long long i = 0; i < n; i += k) {
      sum += ((i / k) * ((get_prefix_sum(prefixsum, i + k - 1, n) -
                          get_prefix_sum(prefixsum, i - 1, n)) %
                         998244353)) %
             998244353;
      sum %= 998244353;
    }
    std::cout << (sum * invn) % 998244353 << " ";
  }
  std::cout << std::endl;
  return 0;
}
