#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n, i1, j1, i2, j2, cmp=0; string out =""; cin >> n >> i1 >> j1 >> i2 >> j2; if( ( ((int)fabs(j2-j1)%2 == 1) && ((int)fabs(i2-i1)%2 == 0) ) || (((int)fabs(j1-j2)%2 == 0) && ((int)fabs(i1-i2)%4 == 0)) ){ //while( ((i1 =! i2 && j1 != j2) || (i1 == i2 && j1 != j2) ||(i1 =! i2 && j1 == j2)) && cmp<4 ){ for(int i=0; i<10000 ; i++){ int t1=i1, t2=i1, tf1= j1, tf2=j2; if( (i1 > i2) && (j1 >= j2) ){ i1 -= 2; j1 -= 1; out.append("UL "); }else if( (i1 > i2) && (j1 < j2)){ i1 -= 2; j1 += 1; out.append("UR "); }else if( (j1 < j2) && (i1 == i2)){ j1 += 2; out.append("R "); }else if( (i1 < i2) && (j1 <= j2) ){ i1 += 2; j1 += 1; out.append("LR "); }else if( (i1 < i2) && (j1 >j2) ){ i1 += 2; j1 -= 1; out.append("LL "); }else if((j1 > j2) && (i1 == i2)){ j1 -= 2; out.append("L"); } if(t1!=i1 || t2!=i1 || tf1 != j1 || tf2!=j2){ cmp++; }else{ break; } } cout << cmp << endl << out << endl; }else{ cout << "Impossible" << endl; } return 0; }