#include <bits/stdc++.h>
using namespace std;
const int oo = 1e9 + 7;
const int modulo = 1e9 + 7;
template <typename T>
inline T sum(const T& a, const T& b) {
  return T((a % modulo + b % modulo) % modulo);
}
template <typename T>
inline T mul(const T& a, const T& b) {
  return T((1LL * (a % (1LL * modulo)) * (b % (1LL * modulo))) %
           (1LL * modulo));
}
string to_string(string a) { return "\"" + a + "\""; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  for (cin >> t; t--;) {
    int n;
    cin >> n;
    vector<pair<int, int> > a(n);
    for (pair<int, int>& p : a) {
      cin >> p.first >> p.second;
    }
    sort(a.begin(), a.end());
    int cnt = 0, x = 0, y = 0;
    string ans;
    bool ok = true;
    for (pair<int, int> p : a) {
      int u = p.first, v = p.second;
      if (v < y) {
        ok = false;
        break;
      }
      for (int i = x; i < u; ++i) ans.push_back('R');
      for (int i = y; i < v; ++i) ans.push_back('U');
      x = u;
      y = v;
    }
    if (ok) {
      cout << "YES\n" << ans << '\n';
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
