CSES - Aalto Competitive Programming 2024 - wk9 - Mon - Chess board tour
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Maija is playing with a weird chess board. She is trying to find a way to tour all the squares on the board by moving a pawn up, down, left or right. The pawn should visit each square exactly once. The board is nn squares tall and mm squares wide. The board's upper left corner has coordinates (1,1)(1, 1) and the lower right corner is at (n,m)(n, m). Find a sequence of moves that starts and ends in (1,1)(1, 1) and visits all the squares or report that no such sequence exists.

Input

A single line contains two integer nn and mm.

Output

Print a string of length n×mn \times m that describes the tour: the ii-th letter is "L" if the ii-th move is left. "R" corresponds to right, "U" to up and "D" to down. Otherwise, print "-1" if there are no suitable sequences.

Constraints

  • 2n,m10002 \leq n, m \leq 1000

Example 1

Input:

4 2

Output:

DDDRUUUL

Example 2

Input:

3 3

Output:

-1