/*#include <stdio.h>
int main()
{
int a,b,i,j,n=0,arr[11][11]= {};
for(i=1; i<=9; i++)
{
for(j=1; j<=9; j++)
{
scanf("%d",&arr[i][j]);
}
}
scanf("%d %d",&i,&j);
if(arr[i][j]==0)
{
n=arr[i-1][j-1]+arr[i][j-1]+arr[i+1][j-1]+arr[i+1][j]+arr[i-1][j]+arr[i-1][j+1]+arr[i][j+1]+arr[i+1][j+1];
printf("%d",n);
}
else //만약 (r,c)가 지뢰가 있는 자리이면 -1
{
printf("-1");
}
return 0;
}
*/
#include<stdio.h>
int main()
{
int a,b,n,w,k,i,j,arr[101][101]={};
scanf("%d %d %d",&n,&a,&b);
arr[a][b]=1;
// 1. 등고선 채우기
//1-1. up
for(i=a-1;i>=1;i--)
{
arr[i][b] = arr[i+1][b]+1;
}
//1-2. down
for(i=a+1;i<=n;i++)
{
arr[i][b] = arr[i-1][b]+1;
}
//1-3. left
for(j=b-1;j>=1;j--)
{
for(i=1;i<=n;i++)
{
arr[i][j]=arr[i][j+1]+1;
}
}
//1-4. right
for(j=b+1;j<=n;j++)
{
for(i=1;i<=n;i++)
{
arr[i][j]=arr[i][j-1]+1;
}
}
//2. 등고선 출력하기
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
return 0;
}



