#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
template<class T> bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;}
template<class T> bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;}

void Solve(){
    int N;
    ll T,X,Y;
    cin>>N>>T>>X>>Y;
    vector<ll>D(N);
    for(int i=0;i<N;i++)cin>>D[i];
    sort(all(D));
    int l=0;
    vector<int>V;
    while(l<N){
        int r=l;
        while(r+1<N&&D[r+1]-D[r]<=T){
            r++;
        }
        V.push_back(r-l+1);
        l=r+1;
    }
    sort(all(V));
    ll ans=0;
    bool flag=true;
    for(int i=0;i<N;i++){
        if(!flag){
            ans+=min(X,Y);
            flag=true;
        }
        V.back()--;
        if(V.back()==0)flag=false;
        cout<<ans<<" ";
    }
    cout<<"\n";
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    Solve();
}