import java.util.*; import static java.util.stream.Collectors.joining; public class Solution { static void printShortestPath(int n, int ystart, int xstart, int yend, int xend) { int dy = Math.abs(ystart - yend); int dx = Math.abs(xstart - xend); if (dy % 2 == 1) { System.out.println("Impossible"); return; } if (dy/2 % 2 == 1 && dx % 2 == 0) { System.out.println("Impossible"); return; } if (dy/2 % 2 == 0 && dx % 2 == 1) { System.out.println("Impossible"); return; } List moves = new ArrayList<>(); printOk(n, ystart, xstart, yend, xend, moves); System.out.println(moves.size()); System.out.println(moves.stream().collect(joining(" "))); } private static void printOk(int n, int ystart, int xstart, int yend, int xend, List moves) { int dy = Math.abs(ystart - yend); int dx = Math.abs(xstart - xend); int k = dx == 0 ? Integer.MAX_VALUE : dy / dx; if (xend < xstart && yend < ystart && k >= 2 || xend == xstart && yend < ystart && xstart > 0 || yend < ystart && xend > xstart && k > 2 || xend < xstart && yend < ystart && k < 2) { moves.add("UL"); printOk(n, ystart - 2, xstart - 1, yend, xend, moves); } else if (xend > xstart && yend < ystart && k <= 2 || xend == xstart && yend < ystart && xstart == 0) { moves.add("UR"); printOk(n, ystart - 2, xstart + 1, yend, xend, moves); } else if (xend > xstart && yend == ystart && xstart < n - 2 || xend > xstart && yend > ystart && k < 2) { moves.add("R"); printOk(n, ystart, xstart + 2, yend, xend, moves); } else if (xend > xstart && yend > ystart && k >= 2 || xend == xstart && yend > ystart && xstart < n - 1 || yend > ystart && xend < xstart && k > 2) { moves.add("LR"); printOk(n, ystart + 2, xstart + 1, yend, xend, moves); } else if (yend > ystart && xend < xstart && k <= 2 || xend == xstart && yend > ystart && xstart == n - 1) { moves.add("LL"); printOk(n, ystart + 2, xstart - 1, yend, xend, moves); } else if (yend == ystart && xend < xstart && xstart > 1) { moves.add("L"); printOk(n, ystart, xstart - 2, yend, xend, moves); } } 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(); } }