Robot Navigation ---------------- A robot is sitting in a large room whose floor is tiled with square tiles. The robot can be told to move from one tile to an adjacent one (in the 4 possible directions). There are obstacles sitting on some tiles; the robot cannot move on to tiles that have an obstacle. Your goal is to compute the smallest number of moves to get the robot from one location to another. Input ----- The input will contain multiple instances. For each instance, the first line contains two numbers, w and d, indicating the width and depth of the room. Assume w and d are positive integers. The next d lines contain a map of the room, with one letter representing each tile. X's indicate obstacles and O's indicate open tiles. There is S which indicates the starting location of the robot and one E which indicates the end location of the robot. The end of the input will be indicated by a line with w=d=0. Output ------ For each instance, output the minimum number of moves required by the robot. If there is no path that avoids the obstacles, your programme should output 0. Sample Input ------------ 9 19 OOOOOOOOXOOOOXXOOOO OOOOOOOOXOOOXXXOOOO XXXXXOOOXOOOOXXOOOO SOOOXOOOXOOXOXXXXXX OOOOXOXOXOOXOXOOOOO OOOOXOXOXOOXOOOOOOO OOOOXOXOXOOXOOOOOOO OOOOOOXOXOOXXXXOOOO OOOOOOXOOOOXXOEOOOO 1 3 SOE 2 3 SXE OXO 0 0 Sample Output ------------- 41 2 0