#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. i1=i_start i2=i_end j1=j_start j2=j_end;count=0 l=[];f=0 if (i_start-i_end)%2==0 or (i_end-i_start)%2==0: for i in range(n//2): if i1>i2 and j1>j2: l.append('UL') i1=i1-2 j1=j1-1 count+=1 if i1>i2 and j1j2: l.append('LL') i1=i1+2 j1=j1-1 count+=1 if (i1j2: l.append('L') j1=j1-2 count+=1 if (i1>i2 and j1==j2) or (i1==i2 and j1