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) { var steps = 0; var arrayOfMoves = []; if(Math.abs(i_start - i_end) % 2 !== 0){ console.log('Impossible'); return; } var distance = [j_end - j_start, i_end - i_start]; var moves = {UL: [-1,-2], UR: [1,-2], R: [2,0], LR: [1,2], LL: [-1,2], L: [-2,0]}; while (distance[0] !==0 || distance[1] !== 0){ if (distance[1] === 0 && Math.abs(distance[0]) === 1){ console.log('Impossible'); return; } if(distance[0] < 0 && distance[1]<-1){ arrayOfMoves.push('UL'); steps++; distance[0] -= moves.UL[0]; distance[1] -= moves.UL[1]; } else if(distance[0] === 0 && distance[1] < -3){ arrayOfMoves.push('UL'); steps++; distance[0] -= moves.UL[0]; distance[1] -= moves.UL[1]; } else if(distance[0]>0 && distance[1]<-1){ arrayOfMoves.push('UR'); steps++; distance[0] -= moves.UR[0]; distance[1] -= moves.UR[1]; } else if(distance[0] > 1 && distance[1] === 0){ arrayOfMoves.push('R'); steps++; distance[0] -= moves.R[0]; distance[1] -= moves.R[1]; } else if(distance[0] > 0 && distance[1] > 1){ arrayOfMoves.push('LR'); steps++; distance[0] -= moves.LR[0]; distance[1] -= moves.LR[1]; } else if(distance[0] === 0 && distance[1] > 3){ arrayOfMoves.push('LR'); steps++; distance[0] -= moves.LR[0]; distance[1] -= moves.LR[1]; } else if(distance[0] < 0 && distance[1] > 1){ arrayOfMoves.push('LL'); steps++; distance[0] -= moves.LL[0]; distance[1] -= moves.LL[1]; } else if(distance[0] < -1 && distance[1] === 0){ arrayOfMoves.push('L'); steps++; distance[0] -= moves.L[0]; distance[1] -= moves.L[1]; } } console.log(steps); console.log(arrayOfMoves.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); }