#include <bits/stdc++.h>
using namespace std;
template <class T>
T expo(T x, T n) {
  T result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % 1000000007ll;
    x = (x * x) % 1000000007ll;
    n = n / 2;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int cases;
  cin >> cases;
  while (cases--) {
    int n;
    cin >> n;
    vector<pair<int, int> > vec(n);
    for (int i = 0; i < n; i++) cin >> vec[i].first >> vec[i].second;
    sort(vec.begin(), vec.end());
    string res;
    int x = 0, y = 0;
    bool flag = true;
    for (int i = 0; i < n; i++) {
      int a = vec[i].first, b = vec[i].second;
      while (x < a) {
        x++;
        res.push_back('R');
      }
      if (y > b) {
        cout << "NO"
             << "\n";
        flag = false;
        break;
      }
      while (y < b) {
        y++;
        res.push_back('U');
      }
    }
    if (flag)
      cout << "YES"
           << "\n"
           << res << "\n";
  }
  return 0;
}
