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 = [], i = i_start, j = j_start; //console.log(n, i_start, j_start, i_end, j_end); var jmax = (i_end + i_start)/4; while(true) { //UL, UR, R, LR, LL, L //console.log(i,j); //Upper if(i > i_end) { if(i - 2 >= i_end) { i = i - 2; if(i == i_end && j - 1 == j_end) { j = j - 1; steps.push("UL"); break; } else if(i == i_end && j + 1 == j_end) { j = j + 1; steps.push("UR"); break; } else { if( j > j_end - jmax) { j = j - 1; steps.push("UL"); } else if(j < j_end + jmax) { j = j + 1; steps.push("UR"); } else { steps = null; break; } } } else { steps = null; break; } //Lower } else if(i < i_end) { if(i + 2 <= i_end) { i = i + 2; if(i == i_end && j + 1 == j_end) { j = j + 1; steps.push("LR"); break; } else if(i == i_end && j - 1 == j_end) { j = j - 1; steps.push("LL"); break; } else { if( j < j_end + jmax) { j = j + 1; steps.push("LR"); } else if(j > j_end - jmax) { j = j - 1; steps.push("LL"); } else { steps = null; break; } } } else { steps = null; break; } //Same Leavel } else { //L or R i == i_end if(j + 2 == j_end) { j = j + 2; steps.push("R"); } else if(j - 2 == j_end) { j = j - 2; steps.push("L"); } else { steps = null; break; } } //console.log(i,j,steps); if(i == i_end && j == j_end) { //console.log('FOUND'); break; } if(i < 0 || j < 0 || i >= n || j >= n) { steps = null; break; } } if(steps == null) { 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); }