#include <bits/stdc++.h>
int c[1005], d[1005];
int main() {
  int t, i, ii, n;
  int cc, f, x;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    int max = 0, maxd[1005] = {0}, maxc = 0;
    scanf("%d", &n);
    for (ii = 0; ii < n; ii++) {
      scanf("%d%d", &c[ii], &d[ii]);
      if (c[ii] > maxc) maxc = c[ii];
    }
    for (cc = 0; cc <= maxc; cc++) {
      f = 0;
      for (x = 0, ii = 0; ii < n; ii++) {
        if (c[ii] == cc) {
          if (cc > 0 && d[ii] < maxd[cc - 1]) {
            f = 1;
            break;
          }
          if (maxd[cc] < d[ii]) maxd[cc] = d[ii];
          x = 1;
        }
      }
      if (f) {
        printf("NO\n");
        break;
      }
      if (!x && cc > 0) maxd[cc] = maxd[cc - 1];
    }
    if (!f) {
      printf("YES\n");
      ii = 0;
      for (cc = 0; cc <= maxc; cc++) {
        for (; ii < maxd[cc]; ii++) printf("U");
        if (cc != maxc) printf("R");
      }
      printf("\n");
    }
  }
}
