mod=998244353 N,K=map(int, input().split()) def xgcd(a, b): x0, y0, x1, y1 = 1, 0, 0, 1 while b != 0: q, a, b = a // b, b, a % b x0, x1 = x1, x0 - q * x1 y0, y1 = y1, y0 - q * y1 return a, x0, y0 def modinv(a, m): g, x, y = xgcd(a, m) if g != 1: raise Exception('modular inverse does not exist') else: return x % m def f(x,y): return x*10000+y def ff(z): x,y=z//10000,z%10000 return x,y gt=modinv(N,mod) from collections import deque d=deque() d.append(0) D={} D[0]=1 for i in range(K): nd=deque();DD={} while d: dd=d.popleft() r,y=ff(dd) p=N-y c=D[f(r,y)] if y!=0: nex=f(r+1,y-1) a=(y*gt*c)%mod if nex not in DD: DD[nex]=0 nd.append(nex) DD[nex]+=a DD[nex]%=mod if p!=0: a=(p*gt*c)%mod nex=f(r,y+1) if nex not in DD: DD[nex]=0 nd.append(nex) DD[nex]+=a DD[nex]%=mod d=nd D=DD ans=0 for d in D: r,y=ff(d) p=N-y c=r+y+p ans+=c*D[d] ans%=mod print(ans)