#include using namespace std; int x[1000000]; string a[1000000]; int c=0; bool visited[500][500]; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end, string st,int count) { // Print the distance along with the sequence of moves. if(i_start<0 || j_start<0 || i_start>=n || j_start>=n) return; else if(visited[i_start][j_start]) return; else if(i_start == i_end && j_start==j_end) { x[c]=count; a[c++]=st; return; } // cout<=j_start && i_endj_start) printShortestPath(n, i_start, j_start+2, i_end, j_end,st+"R ", count+1); if(j_end>=j_start && i_end>i_start) printShortestPath(n, i_start+2, j_start+1, i_end, j_end,st+"LR ",count+1); if(j_end<=j_start && i_end>i_start) printShortestPath(n, i_start+2, j_start-1, i_end, j_end,st+"LL ",count+1); if(j_end> n; int i_start; int j_start; int i_end; int j_end; for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) visited[i][j] = false; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end, st, 0); int min=x[0]; int index =0; if(c==0) cout<<"Impossible"<x[i]) { min = x[i]; index = i; } } cout<