n,m = map(int,input().split()) list1=[] for i in range(1,n+1): num=input().split() list1.append(num) x,y=map(int,input().split()) print(list1[x-1][y-1])