N,M,K=map(int, input().split()) A=list(map(int, input().split())) dp=[0]*(N+1) mod=998244353 D={} import heapq for a in A: if a not in D: D[a]=0 D[a]+=1 B=[] for d in D: heapq.heappush(B,(d,d,D[d])) for i in range(1,N+1): while B: x,y,z=heapq.heappop(B) if i!=x: heapq.heappush(B,(x,y,z)) break else: dp[x]+=z dp[x]%=mod x+=y heapq.heappush(B,(x,y,z)) D={};ans=0;pp=pow(M,K,mod) for i in range(1,N+1): d=dp[i] if d in D: ans+=D[d] else: p=pow(M-d,K,mod) ans+=pp-p D[d]=pp-p print(ans*pow(pp,-1,mod)%mod)