# -*-coding:utf-8-*- while True: try: i_xy,swap_xy,insert_x,insert_y,find_xy=list(map(int,input().split())),list(map(int,input().split())),int(input()),int(input()),list(map(int,input().split())) if i_xy[0] <= 9 and i_xy[1] <= 9:#初始化 print("0") else: ...