import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 #行列の積 def matDot(A,B,MOD): N,M,L = len(A),len(A[0]),len(B[0]) res = [[0]*L for i in range(N)] for i in range(N): for j in range(L): s = 0 for k in range(M): s = (s + A[i][k]*B[k][j]) % MOD res[i][j] = s return res #行列とベクトル=>ベクトル def mat_vec(A,v,MOD): # v=[a,b,c...]の形,縦にしなくて良い B2=[] for i in range(len(v)): B2.append([v[i]]) return matDot(A,B2,MOD) #行列の累乗,Aのx乗 def matPow(A,x,MOD): N = len(A) res = [[0]*N for i in range(N)] for i in range(N): res[i][i] = 1 for i in range(x.bit_length()): if (x>>i) & 1: res = matDot(res,A,MOD) A = matDot(A,A,MOD) return res N,M,K,p,q=MI() b=[0]*N for i in range(N): b[i]=I() A=[[q-p,p],[p,q-p]] v=[1,0] AK=matPow(A,K,mod) P=mat_vec(AK,v,mod) # P=[同じとこ,違うとこ] ans=0 for i in range(N): if i