#include using namespace std; #define rep(i,l,r) for(int i=(l);i<(r);++i) typedef long long ll; int main(){ int n,m; cin>>n>>m; n++; string s; cin>>s; vector a(n,vector(n,1)); a[n-1][0]=0; int h=n-1,w=0; rep(i,0,m){ if(s[i]=='U'){h--; a[h][w]=0;} if(s[i]=='D'){h++; a[h][w]=0;} if(s[i]=='R'){w++; a[h][w]=0;} if(s[i]=='L'){w--; a[h][w]=0;} } rep(i,0,n){rep(j,0,n){cout<