The input contains several test cases. The first line of a test case contains an integer N indicating the number of commands issued by the sergeant (1 ≤ N ≤ 1000). The second line contains N characters, describing a series of commands issued by the Sergeant. Each command is represented by an letter: 'E' (for "Turn left!") and 'D' (for "Turn right!"). The end of input is indicated by N = 0.
The input must be read from standard input.
For each test case in the input your program must produce one line of output, indicating the direction in which the recruit must have its face turned after performing a series of commands, considering that at the beginning the recruit has its face turned to north . The line should contain a letter between 'N', 'L', 'S' and 'O', representing respectively the directions north, east, south and west.
The output should be written to standard output.
Sample Input | Sample Output |
3 |
L |