UVa 118 - Mutant Flatworld Explorers

118 - Mutant Flatworld Explorers

 * http://acm.uva.es/p/v1/118.html

Summary
Straightforward Simulation problem.

Explanation
This one is a very trivial simulation problem. Follow all the instructions carefully, and it should be easy. A common mistake is mixing up x and y, and checking the border.

Input
5 3 1 1 E RFRFRFRF 3 2 N FRRFLLFFRRFLL 0 3 W LLFFFLFLFL

Output
1 1 E 3 2 N LOST 2 3 S