banmen.rb
h,w,n = [int(i) for i in input().split()] bord = [list(input()) for i in range(h)] for i in range(n): a,b = [int(i) for i in input().split()] print(bord[a][b])
Recommended Posts