#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. if (i_start - i_end) % 2 == 0: # possible if i_start == i_end: # all R or all L if (j_start - j_end) % 2 == 0: # can do it if j_start > j_end: nummoves = (j_start - j_end)//2 output = "L" for d in range(1,nummoves): output += " L" print(nummoves) print(output) else: nummoves = (j_end - j_start)//2 output = "R" for d in range(1,nummoves): output += " R" print(nummoves) print(output) else: print("Impossible") if i_start < i_end: # all moving down - LL or LR nummoves = (i_end - i_start)//2 else: # all moving up -- UL or UR nummoves = (i_start - i_end)//2 if (j_start - j_end) % 2 == nummoves % 2: # doable else: print("Impossible") else: print("Impossible") 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)