Бермудский треугольник
БBermuda Triangle area in the Atlantic Ocean, which allegedly occurred the mysterious disappearance of ships and aircraft. Area bounded by lines from Florida to Bermuda, then to Puerto Rico and back to Florida through the Bahamas. Put forward different hypotheses to explain these disappearances, unusual weather patterns to alien abductions.
One of the latest versions associated with the presence of a complex system of currents in the vicinity of Bermuda. The researchers had compiled a detailed map of the most dangerous part of the Bermuda Triangle. Image of a rectangle shape. Map rascherchena grid of square plots, each of which indicates the direction of flow: east, north-east, north, north-west, west, south-west, south, south-east or whirlpool. If the boat enters the station with a given direction of flow, the per unit time is under the influence of this flow moves to the plot, which is in the direction of the current situation. If the boat gets in a cage with a whirlpool, it instantly goes to the bottom. As part of ongoing studies you asked to identify where and how long will make a boat belonging to a given station.
Input
In the first line of the input file contains integers N and M (1 ≤ N, M ≤ 200), specifying the size of the area depicted. The following table size N × M, in each cell of which is recorded information about the direction of flow in the relevant sections of the investigated area. Each cell contains one of values: east, north-east, north, north-west, west, south-west, south, south-east or whirlpool. Then on a separate line given integers x and y, giving the coordinates of the site (row and column, respectively), which was originally located the boat.
Output
If the boat leaves for the final time, the image area on the map, display "Boat has been carried out in K move(s).", where K - the time elapsed until the exit outside the image area. If the boat will sink Bring "Whirlpool in K move(s)!", where K - the time elapsed until falling into the whirlpool. If the boat never leaves the Image of Bring "The Bermuda Triangle..." .