#include #include #include #include #include #include #include int px,py; #define AddX px=px+2; #define SubX px=px-2; #define SubY py=py-1; #define AddY py=py+1; #define AddY2 py=py+2; #define SubY2 py=py-2; void left() { printf("L "); SubY2; } void right() { printf("R "); AddY2; } void upleft() { printf("UL "); SubX; SubY; } void upright() { printf("UR "); SubX; AddY; } void lowleft() { printf("LL "); AddX; SubY; } void lowright() { printf("LR "); AddX; AddY; } void printShortestPath(int n, int xi, int yi, int xf, int yf) { px=xi; py=yi; if(abs(xi-xf)%2!=0 || abs(yi-yf)!=0) printf("Impossible"); else { while(px!=xf || py!=yf) { if(px==xf) { if(abs(yf-py)%2!=0) { printf("Impossible"); exit(0); } if(yf>py) right(); else left(); } else if(py==yf) { if(abs(yf-yi)%4!=0) { printf("Impossible"); exit(0); } else { if(px>xf) { if(px>1&&py>0) upleft(); else } } } } } } int main() { int n; scanf("%i", &n); int i_start; int j_start; int i_end; int j_end; scanf("%i %i %i %i", &i_start, &j_start, &i_end, &j_end); printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }