#!/bin/python3 import sys def printShortestPath(n, i, j, d, e): #print(i,j,d,e) s="" cnt=0 if abs(d-i)%2==0 and (abs(d-i)//2+abs(j-e))%2==0: while i!=d or j!=e: if i>=d: if e<=j and dj and dj: s+='R ' cnt+=1 j+=2 continue if d==i and e=j and d>i and j!=(n-1): s+="LR " cnt+=1 i+=2 j+=1 continue if d==i and e>j: s+='R ' cnt+=1 j+=2 continue if e<=j and d>i and j!=0: s+='LL ' cnt+=1 i+=2 j-=1 continue if d==i and e