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 rowSpace = i_start - i_end; int colSpace = j_start - j_end; //System.out.println(rowSpace + " " + colSpace); ArrayList moves = new ArrayList<>(); HashMap h = new HashMap<>(); h.put("UL", 5); h.put("UR", 4); h.put("R", 3); h.put("LR", 2); h.put("LL", 1); h.put("L", 0); if(rowSpace % 2 != 0)System.out.println("Impossible"); else { //UL, UR, R, LR, LL, L. if(rowSpace >=0){ while(rowSpace != 0){ if(colSpace >= 0){ moves.add("UL"); rowSpace -= 2; colSpace -= 1; } else { moves.add("UR"); rowSpace -= 2; colSpace += 1; } } } else { while(rowSpace != 0){ if(colSpace > 0){ moves.add("LL"); rowSpace += 2; colSpace -= 1; } else { moves.add("LR"); rowSpace += 2; colSpace += 1; } } } if(colSpace > 0){ while(colSpace > 0){ moves.add("L"); colSpace -= 2; } } else { while(colSpace < 0){ moves.add("R"); colSpace += 2; } } if(colSpace != 0){ System.out.println("Impossible"); return; } System.out.println(moves.size()); //sort for(int i = 0; i < moves.size()-1; i++){ String temp =moves.get(i); int tempIndex = i; for(int j = i+1; j < moves.size(); j++){ if(h.get(moves.get(j)) > h.get(temp)){ temp = moves.get(j); tempIndex = j; } } moves.set(tempIndex, moves.get(i)); moves.set(i, temp); } for(int i =0; i < moves.size(); i++){ if(i != moves.size() - 1)System.out.print(moves.get(i) + " "); else System.out.print(moves.get(i)); } } } 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(); } }