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 NN = 2000000 + 117;
const int MM = 2000000 + 117;
long long read() {
  long long fl = 1, x;
  char c;
  for (c = getchar(); (c < '0' || c > '9') && c != '-'; c = getchar())
    ;
  if (c == '-') {
    fl = -1;
    c = getchar();
  }
  for (x = 0; c >= '0' && c <= '9'; c = getchar())
    x = (x << 3) + (x << 1) + c - '0';
  return x * fl;
}
void open() { freopen("a.in", "r", stdin); }
void close() {
  fclose(stdin);
  fclose(stdout);
}
int m, n, l;
long long a[NN][3] = {};
long long t[NN] = {};
long long s[NN] = {};
int res[NN] = {};
int res2[NN] = {};
char trans[2][2] = {};
struct node {
  long long id, c, k;
} p[NN] = {};
bool cmp(node a, node b) { return a.id < b.id; }
long long cl(long long a, long long b) { return (a + b - 1) / b; }
long long fr(long long a, long long b) { return a / b; }
bool solve(long long t[], long long s[], int res[]) {
  for (int i = 1; i <= n; ++i) {
    if ((s[i] + t[i]) & 1) return false;
    s[i] = (s[i] + t[i]) >> 1;
    p[i].id = t[i] % l;
    p[i].k = t[i] / l;
    p[i].c = s[i];
  }
  int cnt = n;
  ++cnt;
  p[cnt].id = 0;
  p[cnt].k = 0;
  p[cnt].c = 0;
  p[++cnt].id = l;
  p[cnt].k = -1;
  p[cnt].c = 0;
  sort(p + 1, p + 1 + cnt, cmp);
  long long low = 0, up = l;
  for (int i = 1; i < cnt; ++i) {
    long long cha = p[i + 1].id - p[i].id;
    long long cc = p[i + 1].c - p[i].c;
    long long kk = p[i + 1].k - p[i].k;
    if (kk == 0) {
      if (cc <= cha && 0 <= cc)
        continue;
      else
        return false;
    }
    if (kk > 0) {
      if (cc - cha > 0) {
        low = max(low, cl(cc - cha, kk));
      }
      if (cc >= 0) {
        up = min(up, fr(cc, kk));
      } else
        return false;
    } else {
      if (cc - cha <= 0) {
        up = min(up, fr(cha - cc, -kk));
      } else
        return false;
      if (cc < 0) {
        low = max(low, cl(-cc, -kk));
      }
    }
  }
  if (low > up) return false;
  long long T = low;
  for (int i = 2; i <= cnt; ++i) {
    if (p[i].id != p[i - 1].id) {
      long long pre = p[i - 1].c - p[i - 1].k * T;
      long long now = p[i].c - p[i].k * T;
      long long c = now - pre;
      for (int j = p[i - 1].id + 1; j <= p[i].id; ++j) {
        if (c)
          --c, res[j] = 1;
        else
          res[j] = 0;
      }
      assert(c == 0);
    }
  }
  return true;
}
int main() {
  n = read();
  l = read();
  trans[1][1] = 'R';
  trans[0][0] = 'L';
  trans[0][1] = 'D';
  trans[1][0] = 'U';
  for (int i = 1; i <= n; ++i) {
    a[i][0] = read();
    a[i][1] = read();
    a[i][2] = read();
  }
  for (int i = 1; i <= n; ++i) {
    t[i] = a[i][0];
    s[i] = a[i][1] + a[i][2];
  }
  if (!solve(t, s, res)) {
    printf("NO\n");
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    t[i] = a[i][0];
    s[i] = a[i][1] - a[i][2];
  }
  if (!solve(t, s, res2)) {
    printf("NO\n");
    return 0;
  }
  for (int i = 1; i <= l; ++i) {
    putchar(trans[res[i]][res2[i]]);
  }
  putchar('\n');
  close();
  return 0;
}