#include<iostream>#include<cstdio>#include<string>#include<cstring>#include<algorithm>#include<limits.h>usingnamespace std;constint N =1e5+10, M =7e6+10;int n, m, q, u, v, t;int q1[N], q2[M], q3[M];int offset;int hh1, hh2, hh3, tt1, tt2 =-1, tt3 =-1;intget_max(){
int maxn = INT_MIN;if(hh1 <= tt1) maxn =max(q1[hh1], maxn);if(hh2 <= tt2) maxn =max(q2[hh2], maxn);if(hh3 <= tt3) maxn =max(q3[hh3], maxn);if(hh1 <= tt1 && maxn == q1[hh1]) hh1++;elseif(hh2 <= tt2 && maxn == q2[hh2]) hh2++;else hh3++;return maxn;}intmain(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
cin >> n >> m >> q >> u >> v >> t;for(int i =0; i < n; i++) cin >> q1[i];
tt1 = n -1;sort(q1, q1 + n);reverse(q1, q1 + n);for(int i =1; i <= m; i++){
int x =get_max();
x += offset;if(i % t ==0) cout << x <<" ";int left = x *1ll* u / v;int right = x - left;
offset += q;
left -= offset, right -= offset;
q2[++tt2]= left, q3[++tt3]= right;}
cout << endl;for(int i =1; i <= m + n; i++){
int x =get_max();if(i % t ==0) cout << x + offset <<" ";}
cout << endl;return0;}