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) { int posX = i_start; int posY = j_start; ArrayList moves = new ArrayList<>(); while(true) { if(posY < 0 || posY >= n || posX < 0 || posX >= n) { moves.add("Impossible"); break; } if(posY == i_end && posX == j_end) break; if(posY > i_end && posX > j_end) { moves.add("UL"); posY -= 2; posX -= 2; } if(posY < i_end && posX > j_end) { moves.add("UR"); posY += 2; posX -= 2; } if(posY > i_end && posX < j_end) { moves.add("LL"); posY -= 2; posX += 2; } if(posY > i_end && posX > j_end) { moves.add("LR"); posY += 2; posX += 2; } if(posY < i_end) { moves.add("R"); posY += 2; } if(posY > i_end) { moves.add("L"); posY -= 2; } } if(containsImpossible(moves)) System.out.println("Impossible"); else { System.out.println(moves.size()); for(String s : moves) System.out.print(s+" "); } } public static boolean containsImpossible(ArrayList a) { String imp = "Impossible"; for(String s : a) if(s.equals(imp)) return true; return false; } 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(); } }