process.stdin.resume(); process.stdin.setEncoding('ascii'); var input_stdin = ""; var input_stdin_array = ""; var input_currentline = 0; process.stdin.on('data', function (data) { input_stdin += data; }); process.stdin.on('end', function () { input_stdin_array = input_stdin.split("\n"); main(); }); function readLine() { return input_stdin_array[input_currentline++]; } /////////////// ignore above this line //////////////////// function printShortestPath(n, i_start, j_start, i_end, j_end) { // Print the distance along with the sequence of moves. // order of priority: UL, UR, R, LR, LL, L //steps allowed x(+/-)2 with y(+/-)0 OR x(+/-)1 with y(+/-)2 let steps=[], diffY=i_end-i_start, diffX=j_end-j_start; while((diffX!=0)||(diffY!=0)){ //console.log(diffX, diffY); if((diffX <= -1) && (diffY <= -2)){//UL steps.push('UL'); diffX++; diffY+=2; } else if( (diffX >= 1) && (diffY <=-2) ){ //UR steps.push('UR'); diffX--;diffY+=2; } else if( diffX >=2 ){ //R steps.push('R'); diffX-=2; } else if( (diffX >= 1) && (diffY >= 2) ){//LR steps.push('LR'); diffX--;diffY-=2; } else if((diffX <= -1) && (diffY >= 2)){//LL steps.push('LL'); diffX++; diffY-=2; } else if( diffX <= -2 ){ //L steps.push('L'); diffX+=2; } else if(diffX==0 && diffY===4){ steps.push('LR'); steps.push('LL'); diffY=0; }else if((diffX!=0)||(diffY!=0)){ //console.log(steps); steps= undefined; break; } } if(!steps){ console.log("Impossible"); } else { console.log(steps.length); console.log(steps.join(" ")); } } function main() { var n = parseInt(readLine()); var i_start_temp = readLine().split(' '); var i_start = parseInt(i_start_temp[0]); var j_start = parseInt(i_start_temp[1]); var i_end = parseInt(i_start_temp[2]); var j_end = parseInt(i_start_temp[3]); printShortestPath(n, i_start, j_start, i_end, j_end); }