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) { char dir = ' '; if(i_start > i_end) dir = 'U'; else if(i_start < i_end) dir = 'L'; else dir = 'S'; char lor = ' '; if(j_start > j_end) lor = 'L'; else lor = 'R'; int rows = Math.abs(i_start - i_end); int cols = Math.abs(j_start - j_end); if((rows&1)==1){System.out.println("Impossible");return;} if((rows%4)!=0&&(cols%2)==0){System.out.println("Impossible");return;} int moves = (rows/2); if(cols>0) moves += (cols-(rows/2))/2; System.out.println(moves); while(rows>0){ rows-=2;cols-=1; System.out.print(dir+""+lor+" "); } if(cols<0) cols*=-1; int i = 0; while(cols>0){ cols-=2; System.out.print(lor+" "); i=1; } System.out.println(); return; } 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(); } }