#include <bits/stdc++.h>
using namespace std;
int st(int n, int a) {
  if (a == 0) return 1;
  long long q = st(n, a / 2);
  q = q * q;
  q = q % 998244353;
  if (a % 2 == 1) q = q * n;
  q = q % 998244353;
  return q;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int b[n + 1];
  b[0] = 0;
  for (int i = 1; i <= n; i++) b[i] = (a[i - 1] + b[i - 1]) % 998244353;
  int res[n + 1];
  for (int i = 0; i <= n; i++) res[i] = 0;
  for (int i = 1; i < n; i++) {
    for (int j = 1; j * j <= i; j++) {
      if (i % j == 0) {
        res[j] = (res[j] + b[n - i]) % 998244353;
        if (j * j != i) res[i / j] = (res[i / j] + b[n - i]) % 998244353;
      }
    }
  }
  long long pr = st(n, 998244351);
  for (int i = 1; i <= n; i++) {
    long long sey = res[i];
    sey *= pr;
    cout << sey % 998244353 << ' ';
  }
  return 0;
}
