is walking on ice, however it's getting warm and after he does every step the ice breaks! You are given 's walking routine, figure out if (and when) will step on the same block twice and fall into the water.
Input Specification
The first line will contain integer (number of steps, ).
Second line will be followed by letters indicating each respective move: U
(up), D
(down), R
(right), or L
(left).
Output Specification
You either output: Fell at N
, or if does not fall then Safe!
.
Sample Input
4
L L R R
Sample Output
Fell at 3
Comments
may soeone explain why y code ainbt worling?