import sys input = sys.stdin.readline N,T,X,Y=map(int,input().split()) D=list(map(int,input().split())) D.sort() LIST=[] count=0 now=-1<<60 for i in range(len(D)): if D[i]<=now+T: count+=1 now=D[i] else: if count>0: LIST.append(count) count=1 now=D[i] if count>0: LIST.append(count) LIST.sort(reverse=True) miss=9 if X>Y: miss=Y else: miss=X ANS=[] now=0 for x in LIST: ANS+=[now]*x now+=miss print(*ANS)