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 y1, int x1, int y2, int x2) { // Print the distance along with the sequence of moves. if((y2-y1)%2 !=0 || y1<0 || x1<0 || y2<0 || x2<0 || y1>=n || x1>=n || y2>=n || x2>=n){ System.out.print("Impossible"); return; } else{ ArrayList actions = new ArrayList(); int steps = 0; while(y1!=y2){ if(y1>y2){ if(x1<=x2 && x1+1=x2){ actions.add("UL"); y1 = y1-2; x1 = x1-1; steps++; } } else if(y1=x2){ actions.add("LL"); y1 = y1+2; x1 = x1-1; steps++; } } } if(y1 == y2){ if((x1-x2)%2 !=0){ System.out.print("Impossible"); return; } else{ while(x1!=x2){ if(x1x2){ actions.add("L"); x1 = x1-2; steps++; } } if(x1 == x2){ System.out.println(steps); for(int i =0; i