#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define endll '\n'
#include <bits/stdc++.h>
using namespace std;
int main()
{
  fast
  ll tst;cin>>tst;
  while(tst--)
  {
    string s;ll l=0,r=0,u=0,d=0,x,y;
    cin>>x>>y>>s;
    for(auto&x:s)
      if(x=='U')u++;
      else if(x=='D')d--;
      else if(x=='L')l--;
      else r++;
    cout<<((x>=0&&r>=x||x<0&&x>=l)&&(y>=0&&u>=y||y<0&&y>=d)?"YES\n":"NO\n");
  }
}