#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    pair<int, int> a[50000];
    int n;
    cin >> n;
    int x, y;
    for (int i = 1; i <= n; i++) {
      cin >> x >> y;
      a[i] = {x, y};
    }
    a[0] = {0, 0};
    string second = "";
    sort(a + 1, a + n + 1);
    bool q = 1;
    for (int i = 1; i <= n; i++) {
      if ((a[i].first < a[i - 1].first) || (a[i].second < a[i - 1].second)) {
        q = 0;
        break;
      }
      int tmp = a[i].first;
      while (tmp > a[i - 1].first) {
        second += 'R';
        tmp--;
      }
      tmp = a[i].second;
      while (tmp > a[i - 1].second) {
        second += 'U';
        tmp--;
      }
    }
    if (!q)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      cout << second << endl;
    }
  }
}
