#include<cstdio>
#include<algorithm>
#define int long long
#define p 1000000007
#define N 114514
using namespace std;
int c,T;
int n,k;
signed main(){
	freopen("traverse.in","r",stdin);
	freopen("traverse.out","w",stdout);
	scanf("%lld%lld",&c,&T);
	while(T--){
		scanf("%lld%lld",&n,&k);
		printf("%lld\n",1);
	}
	return 0;
}
/*
19 1
5 1
19 1
100000 98760
*/
