import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { // Print the distance along with the sequence of moves. if ((i_start - i_end) % 2 == 1) { System.out.println("Impossible"); return; } int lrSteps=0; int llSteps=0; int ulSteps=0; int urSteps=0; int rSteps=0; int lSteps=0; //Move to i while (i_start != i_end) { if (i_start < i_end) { if (j_start <= j_end && j_start < n - 1) { j_start++; i_start+=2; lrSteps++; } else { j_start--; i_start+=2; llSteps++; } } else { if (j_start >= j_end && j_start > 0) { j_start--; i_start-=2; ulSteps++; } else { j_start++; i_start-=2; urSteps++; } } } if ((j_start - j_end) % 2 == 1) { System.out.println("Impossible"); return; } //Move to j while (j_start != j_end) { if (j_start < j_end) { j_start +=2; rSteps++; } if (j_start > j_end) { j_start -=2; lSteps++; } } System.out.println(lrSteps + llSteps + ulSteps + urSteps + rSteps + lSteps); for(int i = 0; i < ulSteps; i++) System.out.print("UL "); for(int i = 0; i < urSteps; i++) System.out.print("UR "); for(int i = 0; i < rSteps; i++) System.out.print("R "); for(int i = 0; i < lrSteps; i++) System.out.print("LR "); for(int i = 0; i < llSteps; i++) System.out.print("LL "); for(int i = 0; i < lSteps; i++) System.out.print("L "); } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int i_start = in.nextInt(); int j_start = in.nextInt(); int i_end = in.nextInt(); int j_end = in.nextInt(); printShortestPath(n, i_start, j_start, i_end, j_end); in.close(); } }