#include using namespace std; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int V=i_start-i_end; int H=j_end-j_start; int count=0; string str; while(V!=0 || H!=0) { if(V>0) { if(V%2!=0) { cout<<"Impossible"<0) { count++;str+=" UR";V-=2;H-=1; } } } if(V==0) { if(H>0 && abs(H)%2!=0) { cout<<"Impossible"<0 && H%2==0) { count++;str+=" R";H-=2; } else if(H<0) { count++;str+=" L";H+=2; } } if(V<0) { if(abs(V)%2!=0) { cout<<"Impossible"<=0) { count++;str+=" LR";V-=-2;H-=1; } else if(H<0) { count++;str+=" LL";V-=-2;H-=-1; } } } str.erase(0,1); cout<> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }