#include #include using namespace std; // Total 8 situations possible // upper , right, lower , left, upper left , upper right, lower right, lower left int main(){ int n; cin >> n; int i1,j1,i2,j2; cin >> i1 >> j1 >> i2 >> j2; if((i1-i2)%2!=0){ cout << "Impossible" << endl; } //Upper or Lower else if(j1==j2){ if((i1-i2)%4!=0){ cout << "Impossible" << endl; }else{ int r = abs(i1-i2); cout << r/2 << endl; //Upper if(i1>i2){ int lCount = r/4; int rCount = r/4; if(j1-lCount>=0){ for(int i=0;ij2){ for(int i=0;ir/2){ cout << (j1-j2+r/2)/2 << endl; for(int i=0;i=0){ for(int i=0;ij1){ int r = i1-i2; if((j2-j1+r/2)%2!=0){ cout << "Impossible" << endl; }else{ if(j2-j1==r/2){ cout << r/2 << endl; for(int i=0;ir/2){ cout << (j2-j1+r/2)/2 << endl; for(int i=0;i=0){ for(int i=0;ii1&&j2>j1){ int r = i2-i1; if((j2-j1+r/2)%2!=0){ cout << "Impossible" << endl; }else{ if(j2-j1==r/2){ cout << r/2 << endl; for(int i=0;ir/2){ cout << (j2-j1+r/2)/2 << endl; for(int i=0;i<(j2-j1-r/2)/2;i++){ cout << "R "; } for(int i=0;ii1&&j2r/2){ cout << (j1-j2+r/2)/2 << endl; for(int i=0;i