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>
using namespace std;
const int MAXBUF = 1 << 23;
char B[MAXBUF], *Si = B, *Ti = B;
inline char getc() {
  if (Si == Ti) Ti = (Si = B) + fread(B, 1, MAXBUF, stdin);
  if (Si == Ti)
    return 0;
  else
    return *Si++;
}
template <class T>
inline void read(T &a) {
  static char c;
  static int fh;
  while (((c = getc()) < '0' || c > '9') && c != '-')
    ;
  if (c == '-')
    fh = -1, a = 0;
  else
    fh = 1, a = c - '0';
  while ((c = getc()) <= '9' && c >= '0') a = (a << 3) + (a << 1) + c - '0';
  if (fh == -1) a = -a;
}
struct node {
  long long t, x, y, te, rm;
} a[200005];
long long t[200005], x[200005], y[200005], tx[200005], ty[200005];
bool ans1[2000005], ans2[2000005];
int c1 = 0, c2 = 0;
inline bool cmp(node a, node b) { return a.rm < b.rm; }
int main() {
  int i, j, k, n;
  long long l, p, q;
  read(n);
  read(l);
  for (i = 1; i <= n; i++) {
    read(a[i].t);
    read(tx[i]);
    read(ty[i]);
    a[i].x = tx[i] + ty[i];
    a[i].y = tx[i] - ty[i];
    a[i].te = a[i].t / l;
    a[i].rm = a[i].t - a[i].te * l;
    if ((a[i].x & 1) != (a[i].t & 1)) {
      puts("NO");
      return 0;
    }
    if ((a[i].y & 1) != (a[i].t & 1)) {
      puts("NO");
      return 0;
    }
  }
  long long xmin = -l, xmax = l, ymin = -l, ymax = l;
  sort(a + 1, a + n + 1, cmp);
  a[n + 1].rm = l;
  a[n + 1].te = -1;
  a[n + 1].x = 0;
  a[n + 1].y = 0;
  for (i = 1; i <= n + 1; i++) {
    long long lm = a[i].rm - a[i - 1].rm, up, dw, lx, rx, ly, ry, ko, bo;
    ko = a[i].te - a[i - 1].te;
    bo = a[i - 1].x - a[i].x;
    if (ko == 0) {
      if (bo > lm || bo < -lm) {
        puts("NO");
        return 0;
      }
      continue;
    }
    if (ko < 0) {
      ko = -ko;
      bo = -bo;
    }
    up = lm - bo;
    dw = -lm - bo;
    lx = dw / ko;
    rx = up / ko;
    while ((lx - 1) * ko >= dw) lx--;
    while (lx * ko < dw) lx++;
    while ((rx + 1) * ko <= up) rx++;
    while (rx * ko > up) rx--;
    if (lx > xmin) xmin = lx;
    if (rx < xmax) xmax = rx;
    if (xmin > xmax) {
      puts("NO");
      return 0;
    }
    ko = a[i].te - a[i - 1].te;
    bo = a[i - 1].y - a[i].y;
    if (ko < 0) {
      ko = -ko;
      bo = -bo;
    }
    up = lm - bo;
    dw = -lm - bo;
    ly = dw / ko;
    ry = up / ko;
    while ((ly - 1) * ko >= dw) ly--;
    while (ly * ko < dw) ly++;
    while ((ry + 1) * ko <= up) ry++;
    while (ry * ko > up) ry--;
    if (ly > ymin) ymin = ly;
    if (ry < ymax) ymax = ry;
    if (ymin > ymax) {
      puts("NO");
      return 0;
    }
  }
  for (p = xmax; p >= xmin; p--) {
    for (q = ymax; q >= ymin; q--) {
      bool tag = 1;
      c1 = c2 = 0;
      for (i = 1; i <= n + 1; i++) {
        t[i] = a[i].rm;
        x[i] = a[i].x - p * a[i].te;
        y[i] = a[i].y - q * a[i].te;
        t[n + 1] = l;
        x[n + 1] = p;
        y[n + 1] = q;
        long long ox = x[i] - x[i - 1], oy = y[i] - y[i - 1];
        bool xx = 0, yy = 0;
        if (ox < 0) ox = -ox, xx = 1;
        if (oy < 0) oy = -oy, yy = 1;
        long long rx = (t[i] - t[i - 1]) - ox, ry = (t[i] - t[i - 1]) - oy;
        if (rx & 1) {
          tag = 0;
          break;
        }
        if (ry & 1) {
          tag = 0;
          break;
        }
        if (rx < 0 || ry < 0) {
          tag = 0;
          break;
        }
        rx >>= 1;
        ry >>= 1;
        while (ox--) ans1[++c1] = xx;
        while (oy--) ans2[++c2] = yy;
        while (rx--) ans1[++c1] = 1, ans1[++c1] = 0;
        while (ry--) ans2[++c2] = 1, ans2[++c2] = 0;
      }
      if (!tag) continue;
      for (i = 1; i <= l; i++) {
        if (ans1[i] && ans2[i]) putchar('L');
        if (ans1[i] && (!ans2[i])) putchar('D');
        if ((!ans1[i]) && ans2[i]) putchar('U');
        if ((!ans1[i]) && (!ans2[i])) putchar('R');
      }
      exit(0);
    }
  }
  return 0;
}