#include using namespace std; #define pb push_back #define pbk pop_back #define mk_pr make_pair #define VISITED 1 #define UNVISITED 0 typedef long long intl; typedef pair pii; typedef pair piii; typedef vector vi; typedef vector vii; typedef vector vss; typedef queue qi; const int MX = 201; int n, x[4]; int dx[] = {-2,-2, 0, 2, 2, 0}; int dy[] = {-1, 1, 2, 1,-1,-2}; bool vis[MX][MX]; pii prnt[MX][MX]; void shortest_path() { qi q; q.push(x[0]), q.push(x[1]); vis[x[0]][x[1]] = VISITED; prnt[x[0]][x[1]] = mk_pr(x[0], x[1]); while( !q.empty() ) { int ux = q.front(); q.pop(); int uy = q.front(); q.pop(); for(int i=0; i<6; i++) { int vx = ux+dx[i]; int vy = uy+dy[i]; if( vx>=0 && vy>=0 && vx=0; i--) { int ddx = path[i].first-path[i+1].first; int ddy = path[i].second-path[i+1].second; if( mk_pr(ddx, ddy)==mk_pr(dx[0], dy[0]) ) { printf("UL"); } else if( mk_pr(ddx, ddy)==mk_pr(dx[1], dy[1]) ) { printf("UR"); } else if( mk_pr(ddx, ddy)==mk_pr(dx[2], dy[2]) ) { printf("R"); } else if( mk_pr(ddx, ddy)==mk_pr(dx[3], dy[3]) ) { printf("LR"); } else if( mk_pr(ddx, ddy)==mk_pr(dx[4], dy[4]) ) { printf("LL"); } else if( mk_pr(ddx, ddy)==mk_pr(dx[5], dy[5]) ) { printf("L"); } if( i!=0 ) printf(" "); else printf("\n"); } } int main() { scanf("%d", &n); for(int i=0; i<4; i++) scanf("%d", x+i); shortest_path(); return 0; }