#include<bits/stdc++.h>
using namespace std;

typedef long long LL;

const int N=200000,M=300,mod=998244353,inv2=499122177;

int add(int a,int b,int p=mod){return a+b>=p?a+b-p:a+b;}
int sub(int a,int b,int p=mod){return a-b<0?a-b+p:a-b;}
int mul(int a,int b,int p=mod){return (LL)a*b%p;}
void sadd(int &a,int b,int p=mod){a=add(a,b,p);}
void ssub(int &a,int b,int p=mod){a=sub(a,b,p);}
void smul(int &a,int b,int p=mod){a=mul(a,b,p);}

int n,m,a[N+9];

void into(){
  scanf("%d%d",&n,&m);
  for (int i=1;i<=n;++i)
	scanf("%d",&a[i]);
}

int c[M+9][M+9];

void Get_c(){
  c[0][0]=1;
  for (int i=1;i<=m;++i){
	c[i][0]=c[i][i]=1;
	for (int j=1;j<i;++j) c[i][j]=add(c[i-1][j-1],c[i-1][j]);
  }
}

int ans[M+9],sum[M+9];

void Get_ans(){
  for (int i=1;i<=n;++i)
	for (int j=0,pw=1;j<=m;++j,smul(pw,a[i])) sadd(sum[j],pw);
  for (int i=0,pw=1;i<=m;++i,smul(pw,2)){
	for (int j=0;j<=i;++j) sadd(ans[i],mul(c[i][j],mul(sum[j],sum[i-j])));
	ssub(ans[i],mul(pw,sum[i]));
  }
}

void work(){
  Get_c();
  Get_ans();
}

void outo(){
  for (int i=1;i<=m;++i)
	printf("%d\n",mul(ans[i],inv2));
}

int main(){
  into();
  work();
  outo();
  return 0;
}
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<string>
#include<stdio.h>
#include<stdlib.h>
#include<float.h>
#include<tuple>
#include<string.h>
#include<iomanip>
#include<stack>
#include<queue>
#include<map>
#include<deque>
#include<math.h>

using namespace std;
#define ll long long
#define rep(i,n) for(ll i=0;i<n;i++)
#define REP(i,n) for(ll i=1;i<=n;i++)
#define ALLOF(c) (c).begin(), (c).end()
#define Pa pair<ll,ll>
const ll mod=1000000007;
const ll INF=1e12;
const ll inf=-1;
ll ABS(ll a){return max(a,-a);}


   
int main(void){
    ll N,K;
    cin>>N>>K;
    K=ABS(K);
    vector<ll> A(0);
    
    REP(i,N) A.push_back(i);
    rep(i,N-1) A.push_back(N-1-i);
  
    ll ans=0;
    for(ll i=0;i+K<A.size();i++) ans+=A.at(i)*A.at(i+K);
    cout<<ans<<endl;
    return 0;
}