if __name__ == '__main__':
    num = int(input().strip())
    for _ in range(num):
        length, width = [int(i) for i in range(input().strip().split())]
        start = tuple(int(i) for i in input().strip().split())
        beeps_num = int(input().strip())
        beeps_list

dfdca35316c0c16d598d6ba21eca4fce9a7b74d0
<mask token>

if __name__ == '__main__':
    num = int(input().strip())
    for _ in range(num):
        length, width = [int(i) for i in range(input().strip().split())]
        start = tuple(int(i) for i in input().strip().split())
        beeps_num = int(input().strip())
        beeps_list
