start = [] end = [] current = [] moves = [] def r(): current[0] = current[0] + 2 def l(): current[0] = current[0] - 2 def ur(): current[0] = current[0] + 1 current[1] = current[1] - 2 def ul(): current[0] = current[0] - 1 current[1] = current[1] - 2 def dr(): current[0] = current[0] + 1 current[1] = current[1] + 2 def dl(): current[0] = current[0] - 1 current[1] = current[1] + 2 def printShortestPath(): status = 0 while current != end and status != "Impossible": if current[1] - end[1] == 1 or current[1] - end[1] == -1: status = "Impossible" break elif current[1] == end[1]: if current[0] - end[0] == 1 or current[0] - end[0] == -1: status = "Impossible" break elif current[0] < end[0]: moves.append("R") r() status += 1 else: moves.append("L") l() status += 1 elif current[1] > end[1]: if current[0] < end[0]: ur() moves.append("UR") status += 1 elif current[0] > end[0]: ul() moves.append("UL") status += 1 else: if current[0] == 0: ur() moves.append("UR") status += 1 else: ul() moves.append("UL") status += 1 elif current[1] < end[1]: if current[0] < end[0]: dr() moves.append("LR") status += 1 elif current[0] > end[0]: dl() moves.append("LL") status += 1 else: if current[0] == 0: dr() moves.append("LR") status += 1 else: dl() moves.append("LL") status += 1 if status == "Impossible": print(status) else: print(status) for i in moves: print(i,end=" ") print("") n = int(input()) inStr= input() inArr = inStr.split(" ") start.append(int(inArr[1])) start.append(int(inArr[0])) end.append(int(inArr[3])) end.append(int(inArr[2])) current = start printShortestPath()