#include<stdio.h>
int main()
{
int a, b, x,y;
scanf("%d%d", &a, &b);
int arr[20][20] = { 0 };
for (int i = 0; i < a; i++)
{
for (int w = 0; w < b; w++)
{
scanf("%d", &arr[i][w]);
}
}
scanf("%d%d", &x, &y);
printf("%d", arr[x - 1][y - 1]);
return 0;
}
int main()
{
int a, b, x,y;
scanf("%d%d", &a, &b);
int arr[20][20] = { 0 };
for (int i = 0; i < a; i++)
{
for (int w = 0; w < b; w++)
{
scanf("%d", &arr[i][w]);
}
}
scanf("%d%d", &x, &y);
printf("%d", arr[x - 1][y - 1]);
return 0;
}