#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    int n, m, aux1, aux2;
    int q;
    cin >> q;
    string ans = "";
    vector<pair<int, int> > v;
    for (int i = 0; i < q; i++) {
      cin >> n >> m;
      v.push_back(make_pair(n, m));
    }
    sort(v.begin(), v.end());
    bool f1 = true;
    bool f2 = true;
    int contr = 0;
    for (auto i = v.begin(); i != v.end(); i++) {
      if (f1) {
        aux1 = i->first;
        aux2 = i->second;
        contr = aux2;
        f1 = false;
        for (int k = 0; k < aux1; k++) ans += "R";
      } else {
        if (aux2 > (i->second)) {
          cout << "NO" << endl;
          f2 = false;
          break;
        }
        if (aux1 != i->first) {
          for (int k = 0; k < contr; k++) ans += "U";
          contr = 0;
        }
        contr += (i->second - aux2);
        for (int k = aux1; k < i->first; k++) ans += "R";
        aux1 = i->first;
        aux2 = i->second;
      }
    }
    if (f2) {
      for (int k = 0; k < contr; k++) ans += "U";
      cout << "YES" << endl;
      cout << ans << endl;
    }
  }
  return 0;
}
