A rover starts at the origin (0, 0) of an infinite grid, facing North. It executes a command string where each character is:
L: rotate 90 degrees to the left (counter-clockwise) in place,R: rotate 90 degrees to the right (clockwise) in place,F: step one unit forward in the current heading.
North increases y, East increases x, South decreases y, West decreases x. Report the final position and heading after all commands.
Input format
A single line: a non-empty string of characters, each one of L, R, F.
Output format
A single line x y D: the final x, the final y, and the heading letter D (one of N, E, S, W).
Constraints
- 1 <= length of the command string <= 100000