#include<bits/stdc++.h>
using namespace std;
int n, m, x, y;
int a[1010][1010];
int main(){
cin >> n >> m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin >> a[i][j];
}
}
cin >> x >> y;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
if(i == x && j == y){
cout << a[i][j];
}
}
}
return 0;
}