#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, x, y;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<pair<int, int> > columnas(1001, {2000, 0});
    vector<int> cajasEnX(1001, 0);
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      columnas[x].first = min(columnas[x].first, y);
      columnas[x].second = max(columnas[x].second, y);
      cajasEnX[x]++;
    }
    string answer = "";
    bool sepuede = true;
    y = 0;
    while (columnas[0].second--) {
      answer += "U";
      y++;
    }
    n -= cajasEnX[0];
    for (int i = 0; i < 1000; i++) {
      if (n == 0) break;
      if (y > columnas[i + 1].first) sepuede = false;
      answer += "R";
      while (columnas[i + 1].second > y) {
        answer += "U";
        y++;
      }
      n -= cajasEnX[i + 1];
    }
    if (sepuede)
      cout << "YES\n" << answer << "\n";
    else
      cout << "NO\n";
  }
  return 0;
}
