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;
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}
long long min(long long a, long long b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}
int n, l;
long long x, y, t;
struct dat {
  int ma;
  long long cy, x, y;
} a[400001];
bool operator<(dat u, dat v) { return u.ma < v.ma; }
int f(long long d) {
  if (d < 0) return f(-d);
  return d % 2;
}
int main() {
  scanf("%d%d", &n, &l);
  for (int i = (1); i <= (n); i++) {
    scanf("%I64d%I64d%I64d", &t, &x, &y);
    if (f(x + y) != f(t)) {
      puts("NO");
      return 0;
    }
    a[i].x = x;
    a[i].y = y;
    a[i].cy = t / (long long)l;
    a[i].ma = t % (long long)l;
  }
  a[0].x = 0;
  a[0].y = 0;
  a[0].cy = 0;
  a[0].ma = 0;
  a[++n].x = 0;
  a[n].y = 0;
  a[n].cy = -1;
  a[n].ma = l;
  sort(a, a + n);
  int mx = -1 * l, my = -1 * l, Mx = l, My = l;
  for (int i = (1); i <= (n); i++) {
    long long dx = abs(a[i].x - a[i - 1].x);
    long long dy = abs(a[i].y - a[i - 1].y);
    if ((dx + dy) >
        abs(a[i].cy - a[i - 1].cy) * l + abs(a[i].ma - a[i - 1].ma)) {
      puts("NO");
      return 0;
    }
    if (a[i].cy != a[i - 1].cy) {
      long long dif = a[i].ma - a[i - 1].ma;
      long long df = abs(a[i].cy - a[i - 1].cy);
      long long de = 1;
      if (a[i].cy < a[i - 1].cy) de = -1;
      long long ax = a[i].x - a[i - 1].x;
      long long ay = a[i].y - a[i - 1].y;
      ax *= de;
      ay *= de;
      while (mx <= Mx && mx * df < ax + ay - dif) mx++;
      while (my <= My && my * df < ax - ay - dif) my++;
      while (mx <= Mx && Mx * df > dif + ax + ay) Mx--;
      while (my <= My && My * df > dif + ax - ay) My--;
    }
  }
  if (f(mx) != f(l)) mx++;
  if (f(my) != f(l)) my++;
  if (mx > Mx || my > My) {
    puts("NO");
    return 0;
  }
  long long dx = (mx + my) / 2;
  long long dy = (mx - my) / 2;
  for (int i = (0); i <= (n - 1); i++) {
    a[i].x -= a[i].cy * dx;
    a[i].y -= a[i].cy * dy;
  }
  int j = 0;
  int px = 0;
  int py = 0;
  a[n].x = dx;
  a[n].y = dy;
  for (int i = (0); i <= (n); i++) {
    while (px < a[i].x) {
      px++;
      j++;
      printf("R");
    }
    while (px > a[i].x) {
      px--;
      j++;
      printf("L");
    }
    while (py < a[i].y) {
      py++;
      j++;
      printf("U");
    }
    while (py > a[i].y) {
      py--;
      j++;
      printf("D");
    }
    while (j != a[i].ma) {
      printf("LR");
      j += 2;
    }
  }
  puts("");
  return 0;
}