import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static void printShortestPath(ArrayList res_l,int n, int i_start, int j_start, int i_end, int j_end) { //System.out.println("#"+j_start+","+i_start); ArrayList compareList = new ArrayList(); compareList.add(0,new int[]{j_start-2,i_start-1});//UL compareList.add(1,new int[]{j_start+1,i_start-2});//UR compareList.add(2,new int[]{j_start+2,i_start}); //R compareList.add(3,new int[]{j_start-1,i_start+2});//LR compareList.add(4,new int[]{j_start+2,i_start-1}); //LL compareList.add(5,new int[]{j_start,i_start-2}); //L String ans = ""; int si = 0; int sj = 0; int end = 0; for(int i = 0; i<=5; i++){ int ii = compareList.get(i)[0];//Row int jj = compareList.get(i)[1];//Col //System.out.println(i+"__"+ii+","+jj); if(ii=0 && jj>=0 && (ii!=i_end || jj!=j_end)){ if(si==0 && sj==0){ ans = getAns(i); si = ii; sj = jj; // System.out.println(i+" ---=====>:"+si+","+sj); } } if(jj==j_end && ii==i_end){ //System.out.println(i+"!!!---=====>:"+ii+","+jj); ans = getAns(i); end = 1; break; } } res_l.add(ans); // System.out.println("---------------"); if(end==0){ if(ans==""){ System.out.println("Impossible"); return; }else { printShortestPath(res_l,n,sj, si, i_end, j_end); } }else{ System.out.println(res_l.size()); for(String s:res_l){ System.out.print(s+' '); } } } static String getAns(int i){ String ans = ""; switch (i){ case 0: ans = "UL"; break; case 1: ans = "UR"; break; case 2: ans = "R"; break; case 3: ans = "LR"; break; case 4: ans = "LL"; break; case 5: ans = "L"; break; } return ans; } 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(); ArrayList res_l = new ArrayList(); printShortestPath(res_l, n, i_start, j_start, i_end, j_end); in.close(); } }