#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. j = j_start iDiff = i_end - i_start jDiff = j_end - j_start numSteps = 0 string = "" if iDiff % 2 == 1 or (iDiff // 2 + jDiff) % 2 == 1: print("Impossible") else: while (iDiff != 0 or jDiff != 0): if iDiff > 0: if j == n - 1 or jDiff <= -iDiff // 2: string += "LL " numSteps += 1 j -= 1 iDiff -= 2 jDiff += 1 elif jDiff <= iDiff // 2: string += "LR " numSteps += 1 j += 1 iDiff -= 2 jDiff -= 1 else: string += "R " numSteps += 1 j += 2 jDiff -= 2 elif iDiff < 0: if j == 0 or jDiff >= -iDiff // 2: string += "UR " numSteps += 1 j += 1 iDiff += 2 jDiff -= 1 else: string += "UL " numSteps += 1 j -= 1 iDiff += 2 jDiff += 1 else: if jDiff > 0: string += "R " numSteps += 1 j += 2 jDiff -= 2 else: string += "L " numSteps += 1 j -= 2 jDiff += 2 print(numSteps) print(string.rstrip()) if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = 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)