#include<iostream>
#include<stdlib.h>
#include <ctime>
using namespace std;
int main()
{
	srand ( time(NULL) );
	int n,k,i,j,x;
	int a[700][700];
	cin>>n>>k;
	for(i=0;i<n;i++)
		for(j=0;j<n;j++)
			cin>>a[i][j];
	x=rand() % k+1;
	cout<<x;
}