#include <bits/stdc++.h>
const int MOD = 998244353;
int power(long long base, int exp) {
  if (exp == 0) {
    return 1;
  }
  if (exp % 2 == 0) {
    return power(base * base % MOD, exp / 2);
  } else {
    return power(base, exp - 1) * base % MOD;
  }
}
int inv(int x) { return power(x, MOD - 2); }
int main() {
  int n;
  scanf("%d", &n);
  int invN = inv(n);
  int a[1 + n];
  long long sum[1 + n];
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  std::sort(a + 1, a + n + 1);
  std::reverse(a + 1, a + n + 1);
  a[0] = 0;
  sum[0] = 0;
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + a[i];
  }
  for (int k = 1; k <= n; k++) {
    long long answer = 0;
    int i;
    for (i = k; i <= n; i += k) {
      answer += (sum[i] - sum[i - k]) * (i / k - 1);
      answer %= MOD;
    }
    answer += (sum[n] - sum[i - k]) * (i / k - 1);
    answer %= MOD;
    answer = answer * invN % MOD;
    printf("%lld ", answer);
  }
  printf("\n");
  return 0;
}
