#include <stdio.h>
int n,arr[101][101]={};
int queue[2][10000]={},front=-1,back=-1;
int num=1;
void push(int x, int y)
{
if(x<=0||x>n||y<0||y>n||arr[x][y]!=0)
{
return ;
}
else
{
queue[0][++back]=x;
queue[1][back]=y;
arr[x][y]=num;
}
}
int main()
{
int x,y,px,py;
scanf("%d %d %d",&n,&x,&y);
push(x,y);
// arr[x][y]=9;
while(1)
{
front++;
px=queue[0][front];
py=queue[1][front];
// px,py 주변에 있으면서, 방문x push
push(px,py+1);
push(px,py-1);
push(px+1,py);
push(px-1,py);
if(front==back)
{
break;
}
}
for(int i=1;i<=n;i++)\
{
for(int j=1;j<=n;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
return 0;
}



