import sys movments = { (1, -2) : "UR", (2 , 0) : 'R', (1, 2) : "LR", (-1, -2): "UL", (-2, 0) : "L", (-1, 2) : "LL" } def printShortestPath(n, i_start, j_start, i_end, j_end): dy, dx = i_end - i_start, j_end - j_start if dy % 2 == 1: print "Impossible" return stepCounter = 0 path = [] while dx != 0 or dy != 0: stepCounter += 1 if dy >= 2: if dx == 0: step = (-1, 2) path.append(movments[step]) stepCounter += 1 dx -= step[0] dy -= step[1] step = (1, 2) path.append(movments[step]) dx -= step[0] dy -= step[1] elif dx > 0: step = (1,2) path.append(movments[step]) dx -= step[0] dy -= step[1] elif dx < 0: step = (-1, -2) path.append(movments[step]) dx -= step[0] dy -= step[1] elif dy <= -2: if dx == 0: step = (-1, -2) path.append(movments[step]) stepCounter += 1 dx -= step[0] dy -= step[1] step = (1, -2) path.append(movments[step]) dx -= step[0] dy -= step[1] elif dx > 0: step = (1, -2) path.append(movments[step]) dx -= step[0] dy -= step[1] elif dx < 0: step = (-1, -2) path.append(movments[step]) dx -= step[0] dy -= step[1] elif dy == 0: if dx > 0: step = (2,0) path.append(movments[step]) dx -= step[0] dy -= step[1] else: step = (-2, 0) path.append(movments[step]) dx -= step[0] dy -= step[1] print stepCounter print " ".join(sortInOrder(path)) def sortInOrder(path): priority = ['UL', 'UR', 'R', 'LR', 'LL', 'L'] sortedInOrder = [] for item in priority: if item in path: sortedInOrder += [item] * path.count(item) return sortedInOrder 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)