#!/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 abs(i_end - i_start) % 2 == 1 or abs(j_end - j_start) % 2 != (abs(i_end - i_start) / 2) % 2: print("Impossible") return re = [] while i_start > i_end: if (i_start - i_end) / 2 > j_end - j_start: re.append('UL') j_start -= 1 else: re.append('UR') j_start += 1 i_start -= 2 while j_start < j_end and j_end - j_start > (i_end - i_start) / 2: re.append('R') j_start += 2 while i_end > i_start: if (i_end - i_start) / 2 > j_start - j_end: re.append('LR') j_start += 1 else: re.append('LL') j_start -= 1 i_start += 2 while j_start > j_end: re.append('L') j_start -= 2 print(len(re)) print(*re) 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)