Building a GSM network is expensive and takes a lot of work. Even after the base transceiver stations (BTS) are built and running, many measurements are needed to determine the state of the network and to plan improvements.
The ACM technicians use special equipment that measures electro-magnetic field strength, transceiver power and signal quality. The equipment is packed into a huge knapsack, and a technician carries it from one BTS to another. The knapsack has no memory large enough for all of the measured values, only a small cache that holds a few seconds of data. The values must therefore be sent to a BTS over an infrared link (IRDA), and IRDA works only when there is direct visibility between the technician and the BTS.
Find a path between the two BTSes such that at least one of them is always visible. A town is modelled as a rectangular grid of P×Q square fields. Each field is 1 meter wide, and field (i,j) carries a non-negative integer Zi,j, the height of the terrain in that place, in meters. The model of the town is made of unit cubes, each of them either solid or empty: in field (i,j) the cubes from height 0 up to height Zi,j are solid.
The technician moves in steps. Each step goes between two neighboring fields in the North, South, West or East direction; diagonal moves are not possible. A step from field A to field B is allowed only if the terrain height in B is not very different from the height in A. In a single step the technician can climb at most 1 meter up or descend at most 3 meters down.
At the end of each step, at least one of the two BTSes must be visible. There can be a point in the middle of a step where no BTS is visible, since the cache handles that data.
A BTS is visible if there is direct visibility between the unit cube just above the terrain at the BTS coordinates and the unit cube just above the terrain at the field where the technician stands. Direct visibility between two cubes means that the line segment connecting the centers of the two cubes does not intersect any solid cube. The segment may touch any number of solid cubes. In other words, consider both the BTS and the technician to be points exactly half a meter above the surface, in the center of the corresponding field.
The IRDA beam can also pass between two cubes that touch each other by their edge, although there is no real space between them. Such a beam touches both of these cubes but does not intersect them.
The technician starts at the field of the first BTS and must reach the field of the second BTS.
The first line contains a single positive integer T, the number of test cases.
The first line of each test case contains two integers P and Q, separated by a single space (1≤P,Q≤200). Then there are P lines, each containing Q integers separated by spaces. These numbers are Zi,j, where 1≤i≤P, 1≤j≤Q and 0≤Zi,j≤5000.
After the terrain description, the last line of each test case contains four numbers R1, C1, R2, C2. These numbers are the positions of the two BTSes, with 1≤R1,R2≤P and 1≤C1,C2≤Q. The first coordinate is the row of the town, the second coordinate is the column.
Find the shortest possible path meeting the criteria above. That is, all steps must be done between neighboring fields, the terrain must not elevate or descend too much, and at the end of each step at least one BTS must be visible.
For each test case, print one line containing The shortest path is M steps long., where M is the number of steps that must be made. If there is no such path, print Mission impossible! instead. Print both sentences exactly as shown, including the period and the exclamation mark.