#include using namespace std; void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { int i; string s; vector str; while(i_start>=0 && j_start>=0 && (i_start!=i_end || j_start!=j_end) && j_starti_end) && (j_start>j_end)) { i_start = i_start - 2; j_start = j_start - 1; s = "UL"; str.push_back(s); } if(i_startj_end) { i_start = i_start + 2; j_start = j_start - 1; s = "LL"; str.push_back(s); } if(i_start>i_end && j_start j_end && i_start == i_end) { j_start = j_start - 2; s = "L"; str.push_back(s); } if(j_start < j_end && i_start == i_end) { j_start = j_start + 2; s = "R"; str.push_back(s); } } if(i_start != i_end || j_start != j_end) cout<<"Impossible"; if(i_start == i_end && j_start == j_end) { 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; }