Problem

There is a bundle of $ n $ cards, with $ i $ written on the $ i $ th card from the bottom. Shuffle this bundle as defined below $ q $ times.


* When looking at the bundle from below, consider a bundle $ x $ made by stacking odd-numbered cards on top, and a bundle $ y $ made by stacking even-numbered cards on top. Then do whatever you like out of the following $ 2 $.
* Operation $ 0 $: Put the bundle $ y $ on the bundle $ x $ to make a bundle of $ 1 $.
* Operation $ 1 $: Put the bundle $ x $ on the bundle $ y $ to make a bundle of $ 1 $.



For example, if you consider shuffling $ 1 $ times for a bundle of $ 6 $ cards (123456 from the bottom), the bundle you get when you perform the operation $ 0 $ is ~~ 246135 ~~ from the bottom. 135246, the bundle obtained by performing the operation $ 1 $ is ~~ 135246 ~~ 246135 from the bottom. (Corrected at 14:52)

After $ q $ shuffle, I want the card with $ k $ to be $ d $ th from the bottom of the bunch.
If possible, print $ q $ of shuffle operations in sequence, and if not, print $ -1 $.

Constraints

The input satisfies the following conditions.

* $ 2 \ le n \ le 10 ^ {15} $
* $ 1 \ le q \ le 10 ^ 6 $
* $ 1 \ le k, d \ le n $
* $ n $ is even

Input

The input is given in the following format.


$ n $ $ q $ $ k $ $ d $


Output

If it is possible to shuffle the conditions, output the shuffle operation on the $ q $ line.

If not possible, output $ -1 $.

Examples

Input

4 2 1 1


Output

0
0


Input

4 2 3 1


Output

0
1


Input

4 1 1 4


Output

-1


Input

7834164883628 15 2189823423122 5771212644938


Output

0
1
1
1
1
1
0
1
0
1
0
0
0
0
0
#include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-9;
const ll mod=1e9+7;
const int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

ll N;

class Set{
	public:
	vpll a;
	void Add(ll u,ll v){a.push_back({u,v});}
	vpll Fix(){
		vpll b,c;
		for(auto p:a){
			ll L=p.first,R=p.second;
			if(L>=N) b.push_back({L-N,R-N});
			else if(R>=N){
				b.push_back({L,N-1});
				b.push_back({0,R-N});
			}
			else b.push_back({L,R});
		}
		sort(b.begin(),b.end());
		ll L,R=-1;
		for(auto p:b){
			if(R<p.first){
				if(R>=0) c.push_back({L,R});
				L=p.first;R=p.second;
			}
			else R=max(R,p.second);
		}
		c.push_back({L,R});
		for(auto &p:c) p={p.first*2,p.second*2};
		return c;
	}
	bool Check(ll x){
		for(auto p:a) if(p.first<=x&&x<p.second) return 1;
		return 0;
	}
	void Open(){
		for(auto p:a) cout<<p.first<<' '<<p.second<<endl;
	}
};

const int M=1000005;
ll n,q,x,y;
Set st[M];

int main(){
	cin>>n>>q>>x>>y;
	x--;y--;
	N=n/2;
	st[q-1].Add(y,y+1);
	for(int i=q-1;i>0;i--){
		vpll tmp=st[i].Fix();
		for(auto p:tmp) st[i-1].Add(p.first,p.second);
	}
//for(int i=0;i<q;i++){st[i].Open();cout<<endl;}
	if(!st[0].Check(x/2)&&!st[0].Check(x/2+N)){
		cout<<-1<<endl;
		return 0;
	}
	for(int i=0;i<q;i++){
		if(st[i].Check(x/2)){
			cout<<x%2<<endl;
			x=x/2;
		}
		else{
			cout<<(x+1)%2<<endl;
			x=x/2+N;
		}
	}
}
