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. if(((i_end-i_start)/2 + j_end - j_start)%2 != 0) console.log("Impossible"); else{ let string = ""; let i = i_start; let j = j_start; let count = 0; while(i != i_end || j != j_end){ if(i > i_end && j >= j_end){ string+="UL "; count++; i-=2; j--; } else if(i > i_end && j < j_end){ string+="UR "; count++; i-=2; j++; } else if(i == i_end && j < j_end){ string+="R "; count++; j+=2; } else if(i < i_end && j <= j_end){ string+="LR "; count++; i+=2; j++; } else if(i < i_end && j > j_end){ string+="LL "; count++; i+=2; j--; } else if(i == i_end && j > j_end){ string+="L "; count++; j-=2; } } console.log(count); console.log(string); } } 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); }