import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.lang.*; public class Solution { static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { String currentPathName = ""; int currentPathNumber = 0; while(true){ if (((Math.abs(i_start - i_end)%2) == 1) || (((Math.abs(i_start - i_end) % 4) == 0) && ((Math.abs(j_start - j_end)%2) == 1)) || ( ((Math.abs(i_start - i_end) % 4) == 2) && ((Math.abs(j_start - j_end)%2) == 0) ) ){ currentPathName = "Impossible"; break; } else{ if ((Math.abs(i_start - i_end)%4) == 0){ if (i_end < i_start){ if (j_end <= j_start){ currentPathName += "UL "; currentPathNumber++; } else{ currentPathName += "UR "; currentPathNumber++; } } else if (i_end == i_start){ if (j_end == j_start) break; else if (j_end > j_start){ currentPathName += "R "; currentPathNumber++; } else{ currentPathName += "L "; currentPathNumber++; } } else{ if (j_end >= j_start){ currentPathName += "LR "; currentPathNumber++; } else{ currentPathName += "LL "; currentPathNumber++; } } } else{ if (i_end < i_start){ if (j_end <= j_start){ currentPathName += "UL "; currentPathNumber++; } else{ currentPathName += "UR "; currentPathNumber++; } } else{ if (j_end >= j_start){ currentPathName += "LR "; currentPathNumber++; } else{ currentPathName += "LL "; currentPathNumber++; } } } } } if (currentPathName.equals("Impossible")) System.out.println(currentPathName); else{ System.out.println(currentPathNumber); System.out.println(currentPathName.substring(0,currentPathName.length()-2)); } } 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(); } }