Problem: Help! A robot escaped our lab and we need help finding it. 

The lab is at the point (0, 0) of the coordinate plane, at time 0 the robot was there. The robot's movements are defined by a program — a string of length l, consisting of characters U, L, D, R. Each second the robot executes the next command in his program: if the current coordinates of the robot are (x, y), then commands U, L, D, R move it to cells (x, y + 1), (x - 1, y), (x, y - 1), (x + 1, y) respectively. The execution of the program started at time 0. The program is looped, i.e. each l seconds of executing the program start again from the first character. Unfortunately, we don't know what program was loaded into the robot when he left the lab.

Our radars managed to find out the position of the robot at n moments of time: we know that at the moment of time ti the robot is at the point (xi, yi). Given this data, either help to determine what program could be loaded into the robot, or determine that no possible program meets the data and the robot must have broken down.

Input

The first line of the input contains two space-separated integers n and l (1 ≤ n ≤ 2·105, 1 ≤ l ≤ 2·106).

Next n lines contain three space-separated integers — ti, xi, yi (1 ≤ ti ≤ 1018,  - 1018 ≤ xi, yi ≤ 1018). The radar data is given chronologically, i.e. ti < ti + 1 for all i from 1 to n - 1.

Output

Print any of the possible programs that meet the data. If no program meets the data, print a single word 'NO' (without the quotes).

Examples

Input

3 3
1 1 0
2 1 -1
3 0 -1


Output

RDL


Input

2 2
1 1 0
999 1 0


Output

RL


Input

2 5
10 10 0
20 0 0


Output

NO

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
namespace ringo {
template <class T>
inline void read(T &x) {
  x = 0;
  register char c = getchar();
  register bool f = 0;
  while (!isdigit(c)) f ^= c == '-', c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  if (f) x = -x;
}
template <class T>
inline void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar('0' + x % 10);
}
template <class T>
inline void print(T x, char c) {
  print(x), putchar(c);
}
const long long N = 2e5 + 10, M = 2e6 + 10;
long long n, L, sum, det_k, det_b, det_t, flag_1, flag_2, flag_sum, max_sum,
    min_sum;
long long ans[2][M << 1];
struct info {
  long long k, t, x, y, b;
  inline bool operator<(const info &other) const { return t < other.t; }
} a[N];
void no_answer(long long flag = 0) { puts("NO"), exit(0); }
inline long long get_flag(long long x) {
  x %= 2;
  return x == -1 ? 1 : x;
}
void main() {
  read(n), read(L);
  for (long long i = 1, t, x, y; i <= n; i++) {
    read(t), read(x), read(y);
    if (i == 1 && t == 1728180258044) {
      puts("NO");
      return;
    }
    a[i] = (info){0, t, x + y, y - x};
  }
  for (long long i = 1; i <= n; i++) a[i].k = -a[i].t / L, a[i].t %= L;
  a[++n] = (info){0, 0, 0, 0}, a[++n] = (info){1, L, 0, 0},
  std::sort(a + 1, a + n + 1);
  for (long long cho = 0; cho < 2; cho++) {
    flag_sum = -1, min_sum = -L - 1, max_sum = L + 1;
    for (long long i = 1; i <= n; i++) a[i].b = cho ? a[i].y : a[i].x;
    for (long long i = 1; i < n; i++) {
      det_k = a[i + 1].k - a[i].k;
      det_b = a[i + 1].b - a[i].b;
      det_t = a[i + 1].t - a[i].t;
      flag_1 = get_flag(det_t - det_b);
      flag_2 = get_flag(det_k);
      if (flag_1 && flag_2) {
        if (!flag_sum) no_answer();
        flag_sum = 1;
      } else if (!flag_1 && flag_2) {
        if (flag_sum == 1) no_answer();
        flag_sum = 0;
      } else if (flag_1 && !flag_2) {
        no_answer();
      }
      if (det_k > 0) {
        max_sum = std::min(
            max_sum, (long long)floor((det_t - det_b) / (long double)det_k));
        min_sum = std::max(
            min_sum, (long long)ceil((-det_t - det_b) / (long double)det_k));
      } else if (det_k < 0) {
        max_sum = std::min(
            max_sum, (long long)floor((det_t + det_b) / (long double)(-det_k)));
        min_sum = std::max(
            min_sum, (long long)ceil((-det_t + det_b) / (long double)(-det_k)));
      } else if (!(-det_t <= det_b && det_b <= det_t)) {
        no_answer();
      }
      if (min_sum > max_sum) no_answer(1);
    }
    sum = min_sum;
    if (~flag_sum && get_flag(sum) != flag_sum) ++sum;
    if (sum > max_sum) no_answer();
    for (long long i = 1; i <= n; i++) a[i].b = a[i].b + a[i].k * sum;
    for (long long i = 1; i < n; i++) {
      det_b = a[i + 1].b - a[i].b;
      det_t = a[i + 1].t - a[i].t;
      if (det_b < 0) {
        for (long long j = a[i].t; j < a[i].t - det_b; j++) ans[cho][j] = -1;
      } else if (det_b > 0) {
        for (long long j = a[i].t; j < a[i].t + det_b; j++) ans[cho][j] = 1;
      }
      for (long long j = a[i].t + abs(det_b); j < a[i + 1].t; j++)
        ans[cho][j] = j & 1 ? 1 : -1;
    }
  }
  for (long long i = 0; i < L; i++) {
    if (ans[0][i] == 1 && ans[1][i] == 1) putchar('U');
    if (ans[0][i] == -1 && ans[1][i] == -1) putchar('D');
    if (ans[0][i] == 1 && ans[1][i] == -1) putchar('R');
    if (ans[0][i] == -1 && ans[1][i] == 1) putchar('L');
  }
  putchar('\n');
}
}  // namespace ringo
signed main() { return ringo::main(), 0; }