#include<iostream>
using namespace std;
int n,c,d,mn;
int main(){
for(int i=0;i<123456;i++){mn=rand()%100;}
while(true){
cin>>n>>d>>c>>mn;
if(n==0 && d==0 && c==0){break;}
cout<<n<<' '<<(rand()*32768+rand())%d<<' '<<c<<endl;
for(int i=0;i<n;i++){
cout<<(rand()*32768+rand())%mn<<endl;
}
}
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBuLGMsZCxtbjsKaW50IG1haW4oKXsKCWZvcihpbnQgaT0wO2k8MTIzNDU2O2krKyl7bW49cmFuZCgpJTEwMDt9Cgl3aGlsZSh0cnVlKXsKCQljaW4+Pm4+PmQ+PmM+Pm1uOwoJCWlmKG49PTAgJiYgZD09MCAmJiBjPT0wKXticmVhazt9CgkJY291dDw8bjw8JyAnPDwocmFuZCgpKjMyNzY4K3JhbmQoKSklZDw8JyAnPDxjPDxlbmRsOwoJCWZvcihpbnQgaT0wO2k8bjtpKyspewoJCQljb3V0PDwocmFuZCgpKjMyNzY4K3JhbmQoKSklbW48PGVuZGw7CgkJfQoJfQp9
MyAxMCAwIDEwCjEwIDEwMCAwIDEwMAoxMCAxMDAwMDAwMDAgMCAxMDAwMDAwMDAwCjE2IDEwMDAwMCAwIDEwMDAwMDAwMDAKMjIgMTAwMDAwIDAgMTAwMDAwMDAwMAoyMiAxMDAwMDAgMSAxMDAwMDAwMDAwCjIyIDEwMDAwMCAyIDEwMDAwMDAwMDAKMjIgMzAwMDAwIDAgMTAwMDAwMDAwMAoyMiAzMjAwMDAwIDEgMTAwMDAwMDAwMAowIDAgMA==
3 10 0 10
10 100 0 100
10 100000000 0 1000000000
16 100000 0 1000000000
22 100000 0 1000000000
22 100000 1 1000000000
22 100000 2 1000000000
22 300000 0 1000000000
22 3200000 1 1000000000
0 0 0