bolt
Try our new interface for solving problems
Problems

# Mouse and corns

In the Indian temple the floor has rectangular form filled with identical square tiles $1 \times 1$. Each tile contains from $0$ to $k~(k \le 30000)$ corns. A mouse runs out from a left lower corner and go to the exit in right upper corner. Mouse can go only right or forward, collecting all the corns from the tiles where it resides. Find the route, where mouse can take as much corn as possible. \includegraphics{https://static.e-olymp.com/content/f2/f2a5a7f2a5c442bdbd844f45d2181de9bfcf0ff6.gif} \InputFile The first line contains $m$ and $n~(1 \le m, n \le 100)$ --- the floor size. Next we have $m$ lines, starting from top, each contains $n$ numbers --- the number of corns on the floor. \OutputFile Print the route of the mouse in format: \textbf{RRFFFRF} (\textbf{F} --- step forward, \textbf{R} --- step right).
Time limit 1 second
Memory limit 128 MiB
Input example #1
2 3
3 2 4
1 5 1

Output example #1
RFR

Author Анатолий Присяжнюк