int main() {
    int n, m;
    scanf("%d %d", &n, &m);
    int val[n + 1][m + 1];
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= m; j++) {
            scanf("%d ", &val[i][j]);
        }
    }
    int x, y;
    scanf("%d %d", &x, &y);
    printf("%d", val[x][y]);
    return 0;
}