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 //////////////////// let moves = 0; let order = ''; let array = []; function printShortestPath(n, i_start, j_start, i_end, j_end) { if ((Math.abs(i_start - i_end) % 2) !== 0) { return "Impossible"; } if(i_start === i_end && j_start === j_end) { array.push(moves,order); let answer = array.toString(); return answer.split(',').join('\n'); } if(i_start < i_end && j_start > j_end) { moves +=1; order += 'LL '; i_start += 2; j_start -= 1; return printShortestPath(n, i_start, j_start, i_end, j_end); } if(i_start < i_end && j_start < j_end) { moves +=1; order += 'LR '; i_start += 2; j_start += 1; return printShortestPath(n, i_start, j_start, i_end, j_end); } if(i_start > i_end && j_start > j_end) { moves +=1; order += 'UL '; i_start -= 2; j_start -= 1; return printShortestPath(n, i_start, j_start, i_end, j_end); } if(i_start > i_end && j_start < j_end) { moves +=1; order += 'UR '; i_start -= 2; j_start += 1; return printShortestPath(n, i_start, j_start, i_end, j_end); } if(i_start === i_end && j_start > j_end) { moves +=1; order += 'L '; j_start -= 2; return printShortestPath(n, i_start, j_start, i_end, j_end) } if(i_start === i_end && j_start < j_end) { moves +=1; order += 'R '; j_start += 2; return printShortestPath(n, i_start, j_start, i_end, j_end) } if(i_start < i_end && j_start === j_end){ if(j_start === n - 1){ moves += 1; order += 'LL ' i_start += 2; j_start -= 1; return printShortestPath(n, i_start, j_start, i_end, j_end) } else { moves += 1; order += 'LR ' i_start += 2; j_start += 1; return printShortestPath(n, i_start, j_start, i_end, j_end) } } } 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]); console.log(printShortestPath(n, i_start, j_start, i_end, j_end)); }