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. let moves = ''; let count = 0; const MOVES = { UL: { j: -1, i: -2 }, UR: { j: 1, i: -2 }, LL: { j: -1, i: 2 }, LR: { j: 1, i: 2 }, L: { j: -2, i: 0 }, R: { j: 2, i: 0 } }; const makeMove = function(move) { i = i - MOVES[move].i; j = j - MOVES[move].j; moves += move + ' '; count++; }; let i = i_end - i_start; let j = j_end - j_start; if (Math.abs(i) % 2 === 0) { while (i !== 0) { if (i > 0) { if (j < 0) { makeMove('LL'); } else { makeMove('LR'); } } else if (i < 0) { if (j < 0) { makeMove('UL'); } else { makeMove('UR'); } } else { console.log('Impossible'); } } while (j !== 0) { if (j === 2) { makeMove('R'); } else if (j === -2) { makeMove('L'); } else { console.log('Impossible'); break; } } console.log(count); console.log(moves.trim()); } else { console.log('Impossible'); } } 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); }