#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
int n, m, q, u, v, t;
double p;
int a[8000001],a1;
int max1;
void add(int s)
{
a[++a1] = s;
max1 = max(max1, s);
int a2 = a1;
while (a2>>1)
{
int next = a2 >> 1;
if (a[next] < a[a2])
{
int z = a[a2];
a[a2] = a[next];
a[next] = z;
a2 = next;
}
else break;
}
}
void de()
{
a[1] = a[a1--];
int a2 = 1;
while ((a2 << 1) <= a1)
{
int next = a2 << 1;
if (next + 1 <= a1 && a[next] < a[next + 1])
next++;
if (a[next] > a[a2])
{
int z = a[next];
a[next] = a[a2];
a[a2] = z;
a2 = next;
}
else break;
}
}
signed main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
//取消同步流
cin >> n >> m >> q >> u >> v >> t;
p=(double)u / (double)v;
for (int i = 1;i <= n;i++)
{
int x;cin >> x;
add(x);
}
int q1=0;
for (int i = 1;i <= m;i++)
{
if(i%t==0)
cout << a[1]+q1 << ' ';
int s = a[1]+q1;//记录最大值的实际长度
de();
q1 += q;
add(floor(s * p)-q1);
add(s-floor(s * p)-q1);
}
cout << '\n';
int a11 = a1;
for (int i = 1;i <= a11;i++)
{
if (i % t == 0)
{
cout << a[1]+q1 << ' ';
}
de();
}
}