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. int xDiff = i_start > i_end ? i_start - i_end : i_end - i_start; int xCount = xDiff / 2; int xMod = xDiff % 2; int pathCount = 0; String path = ""; String pathOfVisit = ""; if(xMod == 0) { if(j_start == j_end) { pathCount = xCount; path = (i_start < i_end) ? "LR LL" : "UR UL"; pathOfVisit = path; if(xCount - 2 > 0) { for(int i = 0; i < xCount - 2; i++) { pathOfVisit += " " + path; } } } else { int endDiff = j_start > j_end ? j_start - j_end : j_end - j_start; int leftRight = (endDiff - xCount) / 2; pathCount = xCount + leftRight; path = i_start > i_end ? "U" : "L"; path += j_start > j_end ? "L" : "R"; pathOfVisit = path; if(xCount - 1>0) { for(int i = 0; i < xCount - 1; i++) { pathOfVisit += " " + path; } } pathOfVisit += j_start > j_end ? " L" : " R"; } System.out.println(pathCount); System.out.println(pathOfVisit); } else System.out.println("Impossible"); } 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(); } }