#include<bits/stdc++.h>
using namespace std;

int main(){
	
	int n,m;
	cin>>n>>m;
	int r=0;
	int ai=1;
    int i=1;
	
	
	while(r<n){
		cout<<ai<<endl;;
		r++;
    }
    
    while(i<n){
    	cout<<i<<" "<<i+1<<endl;
    	i++;
	}
    
    
	return 0;
}