import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.*; public class Solution { static void printShortestPath(int n, int istart, int jstart, int iend, int jend) { // Print the distance along with the sequence of moves. int cnt=0; ArrayList al=new ArrayList<>(); while((istart != iend || jstart != jend) && (istart>=0 && jstart >=0 && istart iend)) { istart-=2; jstart-=1; al.add("UL"); cnt++; } else if(iend<=(istart-2) && jend>=(jstart+1)) { istart-=2; jstart+=1; al.add("UR"); cnt++; } else if(jend>=jstart+2 && istart == iend) { jstart+=2; al.add("R"); cnt++; } else if((iend>=(istart+2) && jend>=(jstart+1)) || (jstart == jend && istart=(istart+2) && jend <=(jstart-1)) { istart+=2; jstart-=1; al.add("LL"); cnt++; } else if(istart == iend && jend<=(jstart-2)) { jstart-=2; al.add("L"); cnt++; } else { //System.out.println("Impossible"); break; } } if(istart==iend && jstart==jend) { System.out.println(cnt); for(int i=0;i