#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
long long bp(long long x, long long y) {
  long long ans = 1;
  x %= mod;
  while (y) {
    if (y & 1) ans = ans * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long mod_inverse(long long x) { return bp(x, mod - 2); }
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long max(long long a, long long b) {
  if (a < b) swap(a, b);
  return a;
}
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first)
    return a.first < b.first;
  else
    return a.second < b.second;
}
void solve() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<pair<long long, long long>> v(n);
    for (long long i = 0; i < n; i++) cin >> v[i].second >> v[i].first;
    sort(v.begin(), v.end(), comp);
    string second = "";
    long long x = 0, y = 0, flag = 0;
    for (long long i = 0; i < n; i++) {
      if (v[i].first < x) {
        flag = 1;
        break;
      }
      if (v[i].first != x) {
        if (y > v[i].second) {
          flag = 1;
          break;
        }
        while (y < v[i].second) y++, second += 'R';
        while (x < v[i].first) x++, second += 'U';
      } else if (v[i].first == x) {
        while (y < v[i].second) y++, second += 'R';
      }
    }
    if (flag == 1)
      cout << "NO" << '\n';
    else
      cout << "YES" << '\n' << second << '\n';
  }
}
signed main() { solve(); }
