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) { Boolean success = false; int moveCount = 0; String path = ""; int i_current = i_start, j_current = j_start; while(1 == 1) { if(i_current > i_end && j_start >= j_end) { moveCount++; path = path + "UL "; i_current = i_current - 2; j_current = j_current - 1; if(i_current < 0 || j_current < 0 || i_current >= n || j_current >= n) break; } else if(i_current > i_end && j_current < j_end) { moveCount++; path = path + "UR "; i_current = i_current - 2; j_current = j_current + 1; if(i_current < 0 || j_current < 0 || i_current >= n || j_current >= n) break; } else if(i_current == i_end && j_current < j_end) { moveCount++; path = path + "R "; j_current = j_current + 2; if(i_current < 0 || j_current < 0 || i_current >= n || j_current >= n) break; } else if(i_current < i_end && j_current <= j_end) { moveCount++; path = path + "LR "; i_current = i_current + 2; j_current = j_current + 1; if(i_current < 0 || j_current < 0 || i_current >= n || j_current >= n) break; } else if(i_current < i_end && j_current > j_end) { moveCount++; path = path + "LL "; i_current = i_current + 2; j_current = j_current - 1; if(i_current < 0 || j_current < 0 || i_current >= n || j_current >= n) break; } else if(i_current == i_end && j_current > j_end) { moveCount++; path = path + "L "; j_current = j_current - 2; if(i_current < 0 || j_current < 0 || i_current >= n || j_current >= n) break; } if(i_current == i_end && j_current == j_end) { success = true; break; } else if(Math.sqrt(Math.pow(i_current-i_start,2) + Math.pow(j_current-j_start,2)) > Math.sqrt(Math.pow(i_end-i_start,2) + Math.pow(j_end-j_start,2))) break; } if(success) { System.out.println(moveCount); System.out.println(path); } 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(); } }