#!/bin/python3 import sys def printShortestPath(n, s1, e1, s2, e2): # Print the distance along with the sequence of moves. pin={(-1,-1):"UL",(1,-1):"UR",(1,1):"LR",(-1,1):"LL",(-1,0):"L",(1,0):"R"} a=[] if s1>s2: digi=s1 while digi>s2: a.append(-1) digi = digi - 2 elif s2>s1: digi=s2 while digi>s1: a.append(1) digi = digi - 2 b = [] if e1 > e2: digi = e1 while digi > e2: b.append(-1) digi=digi - 1 elif e2 > e1: digi = e2 while digi > e1: b.append(1) digi = digi - 1 b.pop() while len(a)