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 N = 2e6 + 5, M = 205, mo = 998244353;
const double eps = 1e-3;
struct rec {
  long long x, z;
} a[N];
struct re {
  long long t, k, c;
} b[N];
int fx[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
int tb, n, pp, xz[3], prt[2][N], i;
long long L, Le, Ri, dk, dc, dt, le[N], ri[N], tmp, X[N], Y[N], Z[N], x, y;
double v1, v2;
bool operator<(rec a, rec b) {
  return a.z % L < b.z % L || a.z % L == b.z % L && a.z < b.z;
}
bool operator<(re a, re b) { return a.t < b.t; }
void check(int *prt, long long X) {
  int i, l, s;
  tb = 0;
  for (i = 1; i <= n; i++)
    if (a[i].z != a[i - 1].z && a[i].z % L != 0)
      b[++tb] = {a[i].z % L, a[i].x - X * (a[i].z / L), 0};
  b[++tb] = {L, X, 0};
  sort(b + 1, b + 1 + tb);
  s = 0;
  l = 0;
  for (i = 1; i <= tb; i++) {
    while (l < b[i].t) {
      if (s > b[i].k)
        prt[l + 1] = -1;
      else
        prt[l + 1] = 1;
      s += prt[++l];
    }
    if (s != b[i].k) {
      pp = 0;
      return;
    }
  }
}
int solve(int *prt) {
  int i;
  for (i = 1; i <= n; i++) {
    if (a[i].z % L == 0) {
      if (a[i].x % (a[i].z / L))
        pp = 0;
      else
        check(prt, a[i].x / (a[i].z / L));
    }
    if (!pp) return 0;
  }
  sort(a + 1, a + 1 + n);
  for (i = 1; i <= n; i++)
    if (a[i].z == a[i - 1].z)
      if (a[i].x != a[i - 1].x) return pp = 0;
  for (i = 1; i <= n; i++)
    if (a[i].z != a[i - 1].z && a[i].z % L == a[i - 1].z % L) {
      if ((a[i].x - a[i - 1].x) % ((a[i].z - a[i - 1].z) / L))
        pp = 0;
      else
        check(prt, (a[i].x - a[i - 1].x) / ((a[i].z - a[i - 1].z) / L));
      return pp;
    }
  tb = 0;
  for (i = 1; i <= n; i++)
    if (a[i].z != a[i - 1].z) b[++tb] = {a[i].z % L, -a[i].z / L, a[i].x};
  b[++tb] = {0, 0, 0};
  b[++tb] = {L, 1, 0};
  sort(b + 1, b + 1 + tb);
  xz[0] = xz[1] = 0;
  Le = -L;
  Ri = L;
  for (i = 2; i <= tb; i++) {
    dk = b[i].k - b[i - 1].k;
    dc = b[i].c - b[i - 1].c;
    dt = b[i].t - b[i - 1].t;
    if (!dk)
      v1 = -L, v2 = L;
    else {
      v1 = double(dt - dc) / double(dk);
      v2 = double(-dt - dc) / double(dk);
      if (v1 > v2) swap(v1, v2);
    }
    (v1 = (v1 > -L) ? v1 : -L);
    (v2 = (v2 < L) ? v2 : L);
    tmp = ((dt - dc) % 2 + 2) % 2;
    dk = (dk % 2 + 2) % 2;
    if (!tmp && dk) xz[0] = 1;
    if (tmp) {
      if (!dk) return pp = 0;
      xz[1] = 1;
    }
    le[i] = trunc(v1 - eps);
    ri[i] = trunc(v2 + eps);
    (Le = (Le > le[i]) ? Le : le[i]);
    (Ri = (Ri < ri[i]) ? Ri : ri[i]);
  }
  if (xz[0] && xz[1]) return pp = 0;
  if (!xz[0] && !xz[1]) xz[0] = xz[1] = 1;
  for (Le; Le <= Ri; Le++)
    if (xz[(Le % 2 + 2) % 2]) {
      check(prt, Le);
      return pp;
    }
  return pp = 0;
}
void Print() {
  int i;
  for (i = 1; i <= L; i++) {
    x = prt[0][i];
    y = prt[1][i];
    prt[0][i] = (x + y) / 2;
    prt[1][i] = (x - y) / 2;
    if (prt[0][i] == 1) putchar('R');
    if (prt[0][i] == -1) putchar('L');
    if (prt[1][i] == 1) putchar('U');
    if (prt[1][i] == -1) putchar('D');
  }
}
int main() {
  scanf("%d %I64d", &n, &L);
  for (i = 1; i <= n; i++) scanf("%I64d %I64d %I64d", &Z[i], &X[i], &Y[i]);
  for (i = 1; i <= n; i++) {
    x = X[i];
    y = Y[i];
    X[i] = x + y;
    Y[i] = x - y;
  }
  for (i = 1; i <= n; i++) a[i].z = Z[i], a[i].x = X[i];
  pp = 1;
  solve(prt[0]);
  if (pp) {
    for (i = 1; i <= n; i++) a[i].z = Z[i], a[i].x = Y[i];
    solve(prt[1]);
  }
  if (!pp)
    printf("NO\n");
  else
    Print();
}