#include <bits/stdc++.h>
using namespace std;
class node {
 public:
  char c;
  long long index;
};
bool compare(node &a, node &b) { return (long long)a.c < (long long)b.c; }
vector<long long> tree[500], visited, in;
bool dfs(long long index, long long parent, long long color) {
  cout << index << " " << parent << " " << color << endl;
  if (in[index] == -1) in[index] = color;
  if (in[index] != color) return false;
  if (visited[index])
    return true;
  else
    visited[index] = 1;
  bool re = true;
  long long i, j;
  for (i = 0; i < tree[index].size(); i++) {
    long long node = tree[index][i];
    if (node == parent) continue;
    re &= dfs(node, index, 1 - color);
  }
  return re;
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long i, j;
    vector<long long> x[1000 + 10];
    long long const N = 1000 + 10;
    for (i = 0; i < N; i++) x[i].clear();
    long long X = 0;
    for (i = 0; i < n; i++) {
      long long a, b;
      cin >> a >> b;
      X = max(X, a);
      x[a].push_back(b);
    }
    for (i = 0; i < N; i++) {
      if (x[i].size() > 1) sort(x[i].begin(), x[i].end());
    }
    string ans = "";
    long long a = 0, b = 0;
    bool impossible = false;
    while (!impossible && a <= X) {
      long long z = x[a].size();
      if (z >= 1) {
        if (x[a][0] < b) {
          impossible = true;
          break;
        }
        long long index = x[a][z - 1];
        for (i = 0; i < index - b; i++) ans += "U";
        b = index;
      }
      if (a < X) {
        a++;
        ans += "R";
      } else
        break;
    }
    if (impossible)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      cout << ans << endl;
    }
  }
}
