#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int maxn=100010;
int n,m,q,u,v,t;
ll s;
priority_queue<ll> Q;
long long read()
{
ll x=0ll; char c=getchar();
while(c<'0' || c>'9') c=getchar();
while(c>='0' && c<='9')
x=(x<<1)+(x<<3)+c-'0',c=getchar();
return x;
}
int main()
{
scanf("%d %d %d %d %d %d",&n,&m,&q,&u,&v,&t);
for(int i=1;i<=n;i++)
Q.push(read());
for(int i=1;i<=m;i++)
{
ll x=Q.top()+s;
Q.pop();
ll xa=x*u/v;
ll xb=x-xa;
if(i%t==0) printf("%lld ",x);
xa-=s,xb-=s;
xa-=q,xb-=q;
Q.push(xa),Q.push(xb);
s+=q;
}
printf("\n");
int i=1;
while(!Q.empty())
{
if(i%t==0) printf("%lld ",Q.top()+s);
Q.pop();
i++;
}
printf("\n");
return 0;
}