Private interests#7205

Private interests

1 second
64 megabytes
Very easy

On a rectangular table with rows and columns, coins are placed on each cell. Two players take turns moving a pawn, either one cell to the right or one cell up. The game begins with the first player starting from the bottom-left corner of the table. The game concludes when the pawn reaches either the top row or the rightmost column. Each player:

Write a program to predict the outcome of the game and the path of the pawn.

Input

The first line contains the natural numbers and . For each from to , the (j + 1)-th line provides non-negative integers representing the coin values in the cells of the -th row, listed from left to right. The total number of these integers does not exceed , and the maximum possible winnings do not exceed (in gold coins).

Output

The first line should display two non-negative integers, representing the total coins collected by the first and second players, respectively.

The second line should show a sequence of characters indicating the pawn's moves (from start to finish) to achieve this result: u for up, r for right.

Examples

Example 1

Loading
Loading