#include using namespace std; void printShortestPath(int n, int js, int is, int je, int ie) { // Print the distance along with the sequence of moves. //if(abs(js-je)%2!=0 || abs(is-ie)%2==0){ //cout<<"Impossible\n"; //return;} vector s; int flag=0; //cout<<"INIT: "<je&&is>ie){ //cout<<"UL "; s.push_back("UL "); js-=2; is--; } else if(js>je&&isie){ //cout<<"LL "; s.push_back("LL "); js+=2; is--; } else if(js==je&&is>ie){ //cout<<"L "; s.push_back("L "); is-=2; } else if(is==ie&&jsje){ //cout<<"UL"; s.push_back("UL "); js-=2; is--; } if(js==je&&is==ie) break; //cout< "; if(js>n||is>n||js<0||is<0){ flag=1;break; } } if(flag==1) cout<<"Impossible"; else{ 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; }