#include <bits/stdc++.h>
using namespace std;
ifstream fin("progresii.in");
ofstream fout("progresii.out");
const int nmax = 100005;
int n;
long long v[nmax], m, k, l, cost;
int main(){
fin >> n >> m >> k >> l;
for (int i = 1; i <= n; ++i){
fin >> v[i];
cost = 1LL * cost + 1 + (l - v[i]) / m;
}
if (cost > k){
fout << -1;
}
else{
for (int i = 1; i <= n; ++i){
cost = 1LL * cost - (1 + (l - v[i]) / m);
long long x, a = (l - v[i]), b = k - cost;
x = a / b + 1;
fout << x << "\n";
cost = 1LL * cost + 1 + (l - v[i]) / x;
}
}
fin.close();
fout.close();
return 0;
}