The first line contains two integers R and C (1≤R≤200, 1≤C≤200), the number of rows and the number of columns of the playing area.
The next R lines describe the playing area. Each line contains exactly C letters, and each letter fixes the action taken in that location. There are five possible letters: N means a move to the previous row, S means a move to the next row, W means a move to the previous column, E means a move to the next column, and T marks the location of the treasure. Exactly one location contains the treasure.