AT_agc072_c [AGC072C] Human Exercise

Description

AtCoder City is represented by an $ N \times N $ grid. Let $ (i, j) $ denote the cell at the $ i $ ‑th row from the top $ (1 \le i \le N) $ and the $ j $ ‑th column from the left $ (1 \le j \le N) $ . Aoki performed the following **exercise** $ K $ times for marathon training. 1. Start from cell $ (1, 1) $ . 2. Repeat the following action $ 2N-2 $ times to reach cell $ (N, N) $ : - Move one cell down or right. If both moves are possible, choose the one whose destination cell has been visited fewer times in the previous exercises. If the counts are equal, choose the downward move. Print the path taken in the $ K $ ‑th exercise.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ K $

Output Format

Print a string of length $ 2N-2 $ . The $ i $ ‑th character should be `D` if the $ i $ ‑th move in the $ K $ ‑th exercise goes downward, and `R` if it goes rightward.

Explanation/Hint

### Sample Explanation 1 The 1st, 2nd, 3rd, and 4th exercises go as follows, so the answer is `RRDDRRDD`. ![ ](https://cdn.luogu.com.cn/upload/vjudge_pic/AT_agc072_c/d0b26e755fe5a10994db376c0ba4fa053ace889dd95ccc5afa5559050ce0153b.png) ### Constraints - $ 2 \le N \le 100 $ - $ 1 \le K \le 10^{18} $ - All input values are integers.