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 for d in D: c=D[d] now=d while True: if now<=N: dp[now]+=c now+=d else: break 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)