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 n, T;
long long ans[2000005];
struct Node {
  long long f, t, s;
} p[2][200005];
struct Data {
  long long t, s;
} pl[200005];
inline long long read() {
  long long ans = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1ll;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    ans = (ans << 1) + (ans << 3) + (c ^ 48), c = getchar();
  return ans * f;
}
bool cmp(const Node &a, const Node &b) { return a.t < b.t; }
bool solve(long long c) {
  long long i, j, L, R, f1, f2, s1, s2, dt, num, h, top, now, der;
  L = 0;
  R = T;
  sort(p[c] + 1, p[c] + n + 1, cmp);
  for (i = 1; i < n; i++) {
    f1 = p[c][i].f;
    f2 = p[c][i + 1].f;
    s1 = p[c][i].s;
    s2 = p[c][i + 1].s;
    dt = p[c][i + 1].t - p[c][i].t;
    if (f2 == f1 + dt) {
      if (s2 - s1 < 0 || s2 - s1 > dt) return 0;
    } else if (f2 > f1 + dt) {
      num = (f2 - dt - f1) / T;
      L = max(L,
              (long long)ceil((long double)(s2 - s1 - dt) / (long double)num));
      R = min(R, (long long)floor((long double)(s2 - s1) / (long double)num));
    } else {
      num = (f1 + dt - f2) / T;
      R = min(R,
              (long long)floor((long double)(s1 + dt - s2) / (long double)num));
      L = max(L, (long long)ceil((long double)(s1 - s2) / (long double)num));
    }
  }
  f1 = p[c][n].f;
  s1 = p[c][n].s;
  if (f1 <= T) {
    L = max(L, s1);
    R = min(R, T - f1 + s1);
  } else {
    dt = T - p[c][n].t;
    num = (f1 + dt - T) / T;
    R = min(R,
            (long long)floor((long double)(s1 + dt) / (long double)(num + 1)));
    L = max(L, (long long)ceil((long double)(s1) / (long double)(num + 1)));
  }
  if (L > R) return 0;
  h = L;
  for (i = 1; i <= n; i++) {
    pl[i].t = p[c][i].t;
    num = (p[c][i].f - 1) / T;
    pl[i].s = p[c][i].s - num * h;
  }
  pl[n + 1].t = T;
  pl[n + 1].s = h;
  top = 0;
  now = 0;
  for (i = 1; i <= n + 1; i++) {
    der = pl[i].s - now;
    for (j = top + 1; j <= top + der; j++) ans[j] += (1ll << c);
    top += der;
    now += der;
    top = pl[i].t;
  }
  return 1;
}
int main() {
  long long i, t, x, y, w;
  n = read();
  T = read();
  for (i = 1; i <= n; i++) {
    t = read();
    x = read();
    y = read();
    p[0][i].f = p[1][i].f = t;
    p[0][i].t = p[1][i].t = (t - 1) % T + 1;
    w = x + y + t;
    if (w < 0 || (w & 1ll)) {
      puts("NO");
      return 0;
    }
    p[0][i].s = w >> 1;
    w = y - x + t;
    if (w < 0 || (w & 1ll)) {
      puts("NO");
      return 0;
    }
    p[1][i].s = w >> 1;
  }
  n++;
  if (solve(0) == 0) {
    puts("NO");
    return 0;
  }
  if (solve(1) == 0) {
    puts("NO");
    return 0;
  }
  for (i = 1; i <= T; i++) {
    if (ans[i] == 3) putchar('U');
    if (ans[i] == 2) putchar('L');
    if (ans[i] == 1) putchar('R');
    if (ans[i] == 0) putchar('D');
  }
  return 0;
}