import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static Queue hardik; static boolean[][] v; static int[][] cnt; static String[][] ans; static String[][] from; static void printShortestPath(int n, int is, int js, int ie, int je) { hardik = new LinkedList<>(); hardik.add(is+" "+js); v = new boolean[n][n]; cnt = new int[n][n]; v[0][0] = true; ans = new String[n][n]; from = new String[n][n]; while(!hardik.isEmpty()) { String[] tmp = hardik.poll().split(" "); int x = Integer.parseInt(tmp[0]); int y = Integer.parseInt(tmp[1]); method(x-2,y-1,x,y,"UL",n); method(x-2,y+1,x,y,"UR",n); method(x,y+2,x,y,"R",n); method(x+2,y+1,x,y,"LR",n); method(x+2,y-1,x,y,"LL",n); method(x,y-2,x,y,"L",n); } if(!v[ie][je]) { System.out.println("Impossible"); }else { System.out.println(cnt[ie][je]); print(ie,je,is,js); } } private static void print(int x1,int y1,int x2,int y2) { if(x1==x2 && y1==y2) { return; } String[] slark = from[x1][y1].split(" "); int x = Integer.parseInt(slark[0]); int y = Integer.parseInt(slark[1]); print(x,y,x2,y2); System.out.print(ans[x1][y1]+" "); } private static void method(int x1,int y1,int x2,int y2,String noob,int n) { if(x1>=0 && y1>0 && x1