#include <bits/stdc++.h>
using namespace std;
bool answer(vector<pair<int, int> >& right, int n, int k, string& ans) {
  int height = 0;
  for (int i = 0; i <= k; i++) {
    if (right[i].second != 10000) {
      if (height > right[i].second) {
        return false;
      }
      for (int j = 0; j < (right[i].first - height); j++) {
        ans.push_back('U');
      }
      height = right[i].first;
    }
    if (i != k) {
      ans.push_back('R');
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    vector<pair<int, int> > right(1500);
    for (int i = 0; i < 1500; i++) {
      right[i].first = -10000;
      right[i].second = 10000;
    }
    int k = 0;
    for (int i = 0; i < n; i++) {
      int x, y;
      cin >> x >> y;
      k = max(x, k);
      right[x].first = max(right[x].first, y);
      right[x].second = min(right[x].second, y);
    }
    string ans;
    if (answer(right, n, k, ans)) {
      cout << "YES" << endl;
      cout << ans << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
