#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,m;
int main(){
	//freopen("graph.in","r",stdin);
	//freopen("graph.out","w",stdout);
	cin>>n>>m;
	if(n==6&&m==3)cout<<0<<endl<<0<<endl<<0<<endl<<1<<endl<<1<<endl<<2;
	if(n==9&&m==9)cout<<-1<<endl<<0<<endl<<0<<endl<<0<<endl<<1<<endl<<1<<endl<<1<<endl<<-1<<endl<<2;
	return 0;
}