#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. delta_i = i_end - i_start delta_i_pos = (delta_i >= 0) delta_j = j_end - j_start delta_j_pos = (delta_j >= 0) moveCounter = 0 moveDict = {} moveList = [] if abs(delta_i) % 2 == 1: print "Impossible" return elif abs(delta_i) % 4 == 2 and abs(delta_j) % 2 == 0: print "Impossible" return elif abs(delta_i) % 4 == 0 and abs(delta_j) % 2 == 1: print "Impossible" return else: while (delta_i) < 0: if (delta_j) < 0: moveCounter += 1 if "UL" in moveDict: moveDict["UL"] += 1 else: moveDict["UL"] = 1 delta_i += 2 delta_j += 1 elif (delta_j) == 0: moveCounter += 2 if "UL" in moveDict: moveDict["UL"] += 1 else: moveDict["UL"] = 1 if "UR" in moveDict: moveDict["UR"] += 1 else: moveDict["UR"] = 1 delta_i += 4 elif (delta_j) > 0: moveCounter += 1 if "UR" in moveDict: moveDict["UR"] += 1 else: moveDict["UR"] = 1 delta_i += 2 delta_j -= 1 while (delta_i > 0) and (delta_j > delta_i / 2): movesHere = ((delta_j) - (delta_i / 2)) / 2 moveCounter += movesHere for i in range (0, movesHere): if "R" in moveDict: moveDict["R"] += 1 else: moveDict["R"] = 1 delta_j -= 2 while (delta_i) > 0: if (delta_j) < 0: moveCounter += 1 if "LL" in moveDict: moveDict["LL"] += 1 else: moveDict["LL"] = 1 delta_i -= 2 delta_j += 1 elif (delta_j) == 0: moveCounter += 2 if "LR" in moveDict: moveDict["LR"] += 1 else: moveDict["LR"] = 1 if "LL" in moveDict: moveDict["LL"] += 1 else: moveDict["LL"] = 1 delta_i -= 4 elif (delta_j) > 0: moveCounter += 1 if "LR" in moveDict: moveDict["LR"] += 1 else: moveDict["LR"] = 1 delta_i -= 2 delta_j -= 1 if delta_i == 0: movesHere = abs(delta_j) / 2 moveCounter += movesHere if delta_j_pos: for i in range (0, movesHere): if "R" in moveDict: moveDict["R"] += 1 else: moveDict["R"] = 1 else: for i in range (0, movesHere): if "L" in moveDict: moveDict["L"] += 1 else: moveDict["L"] = 1 print moveCounter if "UL" in moveDict: moveList.extend(["UL"]*moveDict["UL"]) if "UR" in moveDict: moveList.extend(["UR"]*moveDict["UR"]) if "R" in moveDict: moveList.extend(["R"]*moveDict["R"]) if "LR" in moveDict: moveList.extend(["LR"]*moveDict["LR"]) if "LL" in moveDict: moveList.extend(["LL"]*moveDict["LL"]) if "L" in moveDict: moveList.extend(["L"]*moveDict["L"]) print (' ').join(moveList) if __name__ == "__main__": n = int(raw_input().strip()) i_start, j_start, i_end, j_end = raw_input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end, j_end)