#include<bits/stdc++.h>
using namespace std;
int a[100000];
int main(){
	freopen("meow.in","r",stdin);
	freopen("meow.out","w",stdout);
	int t,n,m,k;
	cin>>t>>n>>m>>k;
	for(int i=1;i<=m;i++)
		cin>>a[i];
	cout<<1<<endl;
	cout<<"1 1"<<endl;
	cout<<m<<endl;
	int count=100;
	if(n==2){
		while(count>=0)
			cout<<"1 2"<<endl;
		count=100;
		while(count>=0)
			cout<<"1 1"<<endl;
		count=10000;
		while(count>=0){
			cout<<"1 1"<<endl;
			cout<<"1 2"<<endl;
			cout<<"2 1 2"<<endl;
			count--;
		}
	}
	else if(n==3){
		while(count>=0)
			cout<<"1 2"<<endl;
		count=100;
		while(count>=0)
			cout<<"1 1"<<endl;
		count=10000;
		while(count>=0){
			cout<<"1 1"<<endl;
			cout<<"1 2"<<endl;
			cout<<"1 3"<<endl;
			cout<<"2 1 2"<<endl;
			cout<<"2 1 3"<<endl;
			cout<<"2 2 3"<<endl;
			count--;
		}
	}
	else{
		while(count>=0)
			cout<<"1 2"<<endl;
		count=100;
		while(count>=0)
			cout<<"1 1"<<endl;
		count=10000;
		while(count>=0){
			cout<<"1 1"<<endl;
			cout<<"1 2"<<endl;
			cout<<"1 3"<<endl;
			cout<<"1 4"<<endl;
			cout<<"1 8"<<endl;
			cout<<"1 7"<<endl;
			cout<<"2 1 2"<<endl;
			cout<<"2 1 3"<<endl;
			cout<<"2 2 3"<<endl;
			count--;
		}
	}
	return 0;
}