The first line is a number T(1<=T<=30), represents the number of case. The next T blocks follow each indicates a case.
The first line of each case contains three integers N, M(2<=N,M<=100), indicating the size of World, and MP(1<=MP<=10).
Then N lines follow, each line contains M integers.
Each module number tells the information of the tile and is the sum of up to ten integers:
1: Grassland and Plains
2: Forest and Jungle
4: Road
8: Enemy
16: A river on northeast of the tile
32: A river on east of the tile
64: A river on southeast of the tile
128: A river on southwest of the tile
256: A river on west of the tile
512: A river on northwest of the tile
(each tile must contain either 1 or 2)
Then a line with two coordinates x1,y1,x2,y2(0<=x1,x2<n,0<=y1,y2<m) indicating the source and destination. There is no enemy in source and destination and source is different from destination.
The picture below shows the coordinate of the World.