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>
const int MN = 200005, ML = 2000005;
int N, L;
long long t[MN], x[MN], y[MN];
int p[MN], a[ML], b[ML];
inline long long divf(long long c, long long d) {
  return (c - ((c % d + d) % d)) / d;
}
inline long long divc(long long c, long long d) {
  return (c + ((d - c % d) % d)) / d;
}
inline bool check(long long *s, int *v) {
  long long lb = 0, rb = L;
  for (int id = 1; id <= N; ++id) {
    int i, j, dis;
    long long ci, cj;
    if (id == N) {
      i = p[id], j = N + 1, s[N + 1] = 0;
      ci = t[i] / L, cj = -1;
      dis = L - t[i] % L;
    } else {
      i = p[id], j = p[id + 1];
      ci = t[i] / L, cj = t[j] / L;
      dis = t[j] % L - t[i] % L;
    }
    if (ci == cj)
      if (s[i] > s[j] || s[j] > s[i] + dis) return 0;
    if (ci > cj) {
      lb = std::max(lb, divc(s[i] - s[j], ci - cj));
      rb = std::min(rb, divf(s[i] - s[j] + dis, ci - cj));
    }
    if (ci < cj) {
      rb = std::min(rb, divf(s[j] - s[i], cj - ci));
      lb = std::max(lb, divc(s[j] - s[i] - dis, cj - ci));
    }
  }
  if (lb > rb) return 0;
  for (int id = 1; id <= N; ++id) {
    int posj, posi, dif;
    if (id == N) {
      int i = p[id];
      posi = t[i] % L, posj = L;
      dif = lb - (s[i] - (t[i] / L) * lb);
    } else {
      int i = p[id], j = p[id + 1];
      posi = t[i] % L, posj = t[j] % L;
      long long xi = s[i] - (t[i] / L) * lb;
      long long xj = s[j] - (t[j] / L) * lb;
      dif = xj - xi;
    }
    for (int k = posj; k > posi; --k) v[k] = dif ? --dif, 1 : 0;
  }
  return 1;
}
int main() {
  scanf("%d%d", &N, &L), ++N;
  p[1] = 1;
  for (int i = 2; i <= N; ++i) {
    long long X, Y;
    scanf("%lld%lld%lld", &t[i], &X, &Y);
    if ((X ^ Y ^ t[i]) & 1) return puts("NO"), 0;
    x[i] = (X + Y + t[i]) / 2, y[i] = (X - Y + t[i]) / 2;
    p[i] = i;
  }
  std::sort(p + 1, p + N + 1, [](int i, int j) { return t[i] % L < t[j] % L; });
  if (!check(x, a) || !check(y, b)) return puts("NO"), 0;
  for (int i = 1; i <= L; ++i) putchar("LUDR"[b[i] * 2 + a[i]]);
  puts("");
  return 0;
}