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;
template <typename T>
T MAX(T a, T b) {
  return (a > b) ? a : b;
}
template <typename T>
T MIN(T a, T b) {
  return (a < b) ? a : b;
}
template <typename T>
void UMAX(T &a, T b) {
  a = (a > b ? a : b);
}
template <typename T>
void UMIN(T &a, T b) {
  a = (a < b ? a : b);
}
int readint() {
  char c = getchar();
  int ret = 0;
  while (!(c >= '0' && c <= '9')) c = getchar();
  while (c >= '0' && c <= '9') {
    ret = ret * 10 + c - '0';
    c = getchar();
  }
  return ret;
}
void putint(int v) {
  if (!v) {
    putchar('0');
    return;
  }
  if (v >= 10) putint(v / 10);
  putchar('0' + (v % 10));
}
int n, l, dir[2][2000005], p[200005];
long long t[200005], x[200005], y[200005];
bool cmp(int a, int b) { return t[a] % (long long)l < t[b] % (long long)l; }
long long divceil(long long a, long long b) {
  if (b < 0ll) a = -a, b = -b;
  if (a >= 0ll) return (a + b - 1ll) / b;
  return -((-a) / b);
}
long long divfloor(long long a, long long b) {
  if (b < 0ll) a = -a, b = -b;
  if (a >= 0ll) return a / b;
  return -divceil(-a, b);
}
void make(int *tar, int l, int r, int s) {
  if (l > r) return;
  int len = r - l + 1, num1 = (len + s) / 2, i;
  for (i = 0; i < num1; ++i) tar[l + i] = 1;
  for (i = num1; i < len; ++i) tar[l + i] = -1;
}
bool calc(long long *x, int *tar) {
  int i, j, k;
  for (i = 0; i < n; ++i) {
    p[i] = i;
    if ((abs(x[i]) & 1ll) != (t[i] & 1ll)) return 0;
  }
  sort(p, p + n, cmp);
  long long lst = 0ll, lsk = 0ll, lsb = 0ll;
  long long mn = (long long)-l, mx = (long long)l;
  for (i = 0; i < n; ++i) {
    int d = p[i];
    long long ck = -(t[d] / (long long)l), cb = x[d];
    long long coe = ck - lsk,
              rngL = lsb - cb - (t[d] % (long long)l) + (lst % (long long)l),
              rngR = lsb - cb + (t[d] % (long long)l) - (lst % (long long)l);
    if (coe < 0ll) {
      coe = -coe;
      rngL = -rngL;
      rngR = -rngR;
      swap(rngL, rngR);
    }
    lst = t[d];
    lsk = ck;
    lsb = cb;
    if (!coe) {
      if (rngL <= 0ll && rngR >= 0ll) continue;
      return 0;
    }
    UMAX(mn, divceil(rngL, coe));
    UMIN(mx, divfloor(rngR, coe));
  }
  long long coe = 1ll - lsk, rngL = -(long long)l + (lst % (long long)l) + lsb,
            rngR = (long long)l - (lst % (long long)l) + lsb;
  if (coe < 0ll) {
    coe = -coe;
    rngL = -rngL;
    rngR = -rngR;
    swap(rngL, rngR);
  }
  if (!coe) {
    if (!(rngL <= 0ll && rngR >= 0ll)) return 0;
  } else {
    UMAX(mn, divceil(rngL, coe));
    UMIN(mx, divfloor(rngR, coe));
  }
  if ((abs(mn) & 1ll) != (long long)(l & 1)) ++mn;
  if (mn > mx) return 0;
  lst = 1ll;
  long long lsp = 0ll;
  for (i = 0; i < n; ++i) {
    int d = p[i];
    long long ck = -(t[d] / (long long)l), cb = x[d], cp = ck * mn + cb;
    make(tar, lst, t[d] % (long long)l, cp - lsp);
    lsp = cp;
    lst = (t[d] % (long long)l) + 1ll;
  }
  make(tar, lst, l, mn - lsp);
  return 1;
}
int main() {
  int i, j, k;
  scanf("%d%d", &n, &l);
  for (i = 0; i < n; ++i) {
    scanf("%I64d%I64d%I64d", t + i, x + i, y + i);
    x[i] = x[i] + y[i];
    y[i] = x[i] - y[i] - y[i];
  }
  if (!calc(x, dir[0]) || !calc(y, dir[1]))
    printf("NO\n");
  else {
    for (i = 1; i <= l; ++i) {
      if (dir[0][i] == 1 && dir[1][i] == 1)
        printf("R");
      else if (dir[0][i] == 1 && dir[1][i] == -1)
        printf("U");
      else if (dir[0][i] == -1 && dir[1][i] == 1)
        printf("D");
      else
        printf("L");
    }
    printf("\n");
  }
  return 0;
}