#include using namespace std; int n,a,b,x,y; vector >> v; void bfs() { int i,j; queue > q; q.push(make_pair(a,b)); v[a][b].first=1; while(!q.empty()) { i=q.front().first; j=q.front().second; q.pop(); if(i>1 && j>0 && v[i-2][j-1].first==0) { q.push(make_pair(i-2,j-1)); v[i-2][j-1].first=v[i][j].first+1; v[i-2][j-1].second=1; } if(i>1 && j0 && v[i+2][j-1].first==0) { q.push(make_pair(i+2,j-1)); v[i+2][j-1].first=v[i][j].first+1; v[i+2][j-1].second=5; } if(j>1 && v[i][j-2].first==0) { q.push(make_pair(i,j-2)); v[i][j-2].first=v[i][j].first+1; v[i][j-2].second=6; } } } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ cin>>n>>a>>b>>x>>y; pair p=make_pair(0,0); int i,j; vector > vi; for(i=0;i s; while(i!=a || j!=b) { if(v[i][j].second==1) { s.push(1); i+=2; j+=1; } else if(v[i][j].second==2) { s.push(2); i+=2; j-=1; } else if(v[i][j].second==3) { s.push(3); j-=2; } else if(v[i][j].second==4) { s.push(4); i-=2; j-=1; } else if(v[i][j].second==5) { s.push(5); i-=2; j+=1; } else if(v[i][j].second==6) { s.push(6); j+=2; } } while(!s.empty()) { i=s.top(); s.pop(); if(i==1) cout<<"UL "; else if(i==2) cout<<"UR "; else if(i==3) cout<<"R "; else if(i==4) cout<<"LR "; else if(i==5) cout<<"LL "; else if(i==6) cout<<"L "; } } return 0; }