import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { //order of priority: UL, UR, R, LR, LL, L. static PriorityQueue q=new PriorityQueue(); static void printQ(PriorityQueue q) { Iterator itr=q.iterator(); while(itr.hasNext()){ System.out.print(itr.next()+" "); } } static int check(int n, int i_start, int j_start, int i_end, int j_end, int step) { if(i_start==i_end && j_start==j_end)//path(q,n-1,i_start, j_start, i_end, j_end)) { System.out.println(step); printQ(q); return 0; } else if(i_start<0 | i_start>=n | j_start<0 | j_start>=n){ return 1; } else{ printShortestPath(n, i_start, j_start, i_end, j_end,step+1); } return 1; } static void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end, int step) { // Print the distance along with the sequence of moves. q.add("UL"); i_start-=2; j_start-=1; if(check(n, i_start, j_start, i_end, j_end,step)==0){ return; } else{ i_start+=2; j_start+=1; q.remove(); q.add("UR"); i_start-=2; j_start+=1; if(check(n, i_start, j_start, i_end, j_end,step)==0){ return; } else{ i_start+=2; j_start-=1; q.remove(); q.add("R"); j_start+=2; if(check(n, i_start, j_start, i_end, j_end,step)==0){ return; } else{ j_start-=2; q.remove(); q.add("LR"); i_start+=2; j_start+=1; if(check(n, i_start, j_start, i_end, j_end,step)==0){ return; } else{ i_start-=2; j_start-=1; q.remove(); q.add("LL"); i_start+=2; j_start-=1; if(check(n, i_start, j_start, i_end, j_end,step)==0){ return; } else{ i_start-=2; j_start+=1; q.remove(); q.add("L"); j_start-=2; if(check(n, i_start, j_start, i_end, j_end,step)==0){ return; } 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,0); in.close(); } }