#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXLEN = 2000000;
const int MAXPOS = 200000;
const int MAXN = MAXPOS + 2;
typedef struct P {
  long long x, y, p, q;
} P;
bool operator<(const P &a, const P &b) { return a.q < b.q; }
int npos, len;
long long x[MAXPOS], y[MAXPOS], t[MAXPOS];
int n;
P p[MAXN];
void createp(long long ct, long long cx, long long cy) {
  long long cp = ct / len, cq = ct % len;
  p[n].x = cx, p[n].y = cy, p[n].p = cp, p[n].q = cq;
  ++n;
}
long long bound[4];
long long divdown(long long a, long long b) {
  if (b < 0) a = -a, b = -b;
  return a >= 0 ? a / b : (a - b + 1) / b;
}
void createcond(int type, long long mult, long long lim) {
  long long cbound = divdown(lim, mult);
  if (cbound < bound[type]) {
    bound[type] = cbound;
  }
}
char ret[MAXLEN + 1];
void run() {
  scanf("%d%d", &npos, &len);
  for (int i = (0); i < (npos); ++i)
    scanf("%I64d%I64d%I64d", &t[i], &x[i], &y[i]);
  n = 0;
  createp(0, 0, 0);
  createp(0, 0, 0);
  p[n - 1].p = -1, p[n - 1].q = len;
  for (int i = (0); i < (npos); ++i) createp(t[i], x[i], y[i]);
  sort(p, p + n);
  for (int i = (0); i < (4); ++i) bound[i] = LLONG_MAX;
  for (int i = (0); i < (n - 1); ++i) {
    long long dx = p[i + 1].x - p[i].x, dy = p[i + 1].y - p[i].y,
              dp = p[i + 1].p - p[i].p, dq = p[i + 1].q - p[i].q;
    if (dp == 0) continue;
    createcond(dp > 0 ? 3 : 0, abs(dp), dq - dx - dy);
    createcond(dp > 0 ? 1 : 2, abs(dp), dq + dx - dy);
    createcond(dp > 0 ? 2 : 1, abs(dp), dq - dx + dy);
    createcond(dp > 0 ? 0 : 3, abs(dp), dq + dx + dy);
  }
  for (long long ds = -bound[3]; ds <= bound[0] && ds <= -bound[3] + 3; ++ds)
    for (long long dt = -bound[2]; dt <= bound[1] && dt <= -bound[2] + 3;
         ++dt) {
      if ((ds + dt) % 2 != 0) continue;
      long long DX = (ds + dt) / 2, DY = (ds - dt) / 2;
      bool ok = true;
      int at = 0;
      for (int i = (0); i < (n - 1); ++i) {
        long long dx = p[i + 1].x - p[i].x, dy = p[i + 1].y - p[i].y,
                  dp = p[i + 1].p - p[i].p, dq = p[i + 1].q - p[i].q;
        long long cx = dx - dp * DX, cy = dy - dp * DY;
        long long acx = abs(cx), acy = abs(cy);
        if (acx + acy > dq) {
          ok = false;
          break;
        }
        if ((acx + acy) % 2 != dq % 2) {
          ok = false;
          break;
        }
        for (int j = (0); j < (acx); ++j) ret[at++] = cx < 0 ? 'L' : 'R';
        for (int j = (0); j < (acy); ++j) ret[at++] = cy < 0 ? 'D' : 'U';
        for (int j = (0); j < (dq - acx - acy); ++j)
          ret[at++] = j % 2 == 0 ? 'L' : 'R';
      }
      if (!ok) continue;
      ret[at++] = '\0';
      printf("%s\n", ret);
      return;
    }
  printf("NO\n");
}
int main() {
  run();
  return 0;
}
