import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { int count = 0,find=0; int a[][]= null; String b[]=null; void set ( int n ) { b=new String[n*n]; a=new int[n][n]; for (int row=0; row=n)||(j_start>=n)) { return 0; } if((i_start==i_end)&&(j_start==j_end)) { find++; System.out.println(""+count); for(int i=1;i<=n*n;i++) { System.out.print(" "+b[i]); } return 1; } else if((i_start=0)&&(j_ul>=0)){ if((a[i_ul][j_ul]==0)){ b[count]="UL"; printShortestPath(n,i_ul,j_ul,i_end,j_end); } } i_ur=i_start-2; j_ur=j_start+1 ; if((i_ur=0)&&(j_ur>=0)){ if((a[i_ur][j_ur]==0)){ b[count]="UR"; printShortestPath(n,i_ur,j_ur,i_end,j_end); } } i_r=i_start; j_r=j_start+2 ; if((i_r=0)&&(j_r>=0)){ if((a[i_r][j_r]==0)){ b[count]="R"; printShortestPath(n,i_r,j_r,i_end,j_end); } } i_lr=i_start+2; j_lr=j_start+1 ; if((i_lr=0)&&(j_lr>=0)){ if((a[i_lr][j_lr]==0)){ b[count]="LR"; printShortestPath(n,i_lr,j_lr,i_end,j_end); } } i_ll=i_start+2; j_ll=j_start-1 ; if((i_ll=0)&&(j_ll>=0)){ if((a[i_ll][j_ll]==0)){ b[count]="LL"; printShortestPath(n,i_ll,j_ll,i_end,j_end); } } i_l=i_start; j_l=j_start-2 ; if((i_l=0)&&(j_l>=0)){ if((a[i_l][j_l]==0)){ b[count]="L"; printShortestPath(n,i_l,j_l,i_end,j_end); } } } return find; } public static void main(String[] args) { Scanner in = new Scanner(System.in); Solution o=new Solution(); int n = in.nextInt(); o.set(n); int i_start = in.nextInt(); int j_start = in.nextInt(); int i_end = in.nextInt(); int j_end = in.nextInt(); int c= o.printShortestPath(n, i_start, j_start, i_end, j_end); //int c=o.getfind(); if(c==0) { System.out.println("Impossible"); } in.close(); } }