#include using namespace std; //int n; int a[210][210]; int b[210][210]; void updatePath(int n,int i,int j,int m,int dir) { if(i>n||j>n||i<0||j<0) { return; } else if(mm+1) updatePath(n,i-2,j-1,m+1,1); if(a[i-2][j+1]>m+1) updatePath(n,i-2,j+1,m+1,2); if(a[i][j+2]>m+1) updatePath(n,i,j+2,m+1,3); if(a[i+2][j+1]>m+1) updatePath(n,i+2,j+1,m+1,4); if(a[i+2][j-1]>m+1) updatePath(n,i+2,j-1,m+1,5); if(a[i][j-2]>m+1) updatePath(n,i,j-2,m+1,6); } void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { vector vi; updatePath(n,i_start,j_start,0,0); if(a[i_end][j_end]==16843009) cout<<"Impossible"<=0;i--) { if(vi[i]==1) cout<<"UL "; else if(vi[i]==2) cout<<"UR "; else if(vi[i]==3) cout<<"R "; else if(vi[i]==4) cout<<"LR "; else if(vi[i]==5) cout<<"LL "; else if(vi[i]==6) cout<<"L "; } } } int main() { memset (a,1,sizeof(a)); int n; cin >> 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; }