#include<stdio.h>
typedef struct
{
int x;
int y;
}v;
int queue[1001][1001] = {}, rear = -1, front = -1;
v arr[1001];
int push()
{
}
int main()
{
int i, j, k, n, m;
scanf("%d %d", &n, &m);
for (i = 1 ; i <= m ; i ++)
{
for (j = 1 ; j <= n ; j ++)
{
scanf("%d", &queue[i][j]);
}
}
}