#!/bin/python3 import sys dic = {'1':'UL', '2':'UR', '3':'R', '4':'LR', '5':'LL', '6':'L'} def printShortestPath(n, i_start, j_start, i_end, j_end): moves = 0 string = '' tab = [] # Print the distance along with the sequence of moves. if abs(i_start-i_end) % 2 == 0 and ((i_start % 4 != i_end % 4 and j_start % 2 != j_end % 2) or (i_start % 4 == i_end % 4 and j_start % 2 == j_end % 2)): while i_start != i_end or j_start != j_end: if i_start > i_end: if j_start >= j_end: #UL string += '1 ' moves += 1 i_start -= 2 j_start -= 1 elif j_start < j_end: #UR string += '2 ' moves += 1 i_start -= 2 j_start += 1 elif i_start == i_end and j_start < j_end: #R string += '3 ' moves += 1 j_start += 2 elif i_start < i_end: if j_start <= j_end: #LR string += '4 ' moves += 1 i_start += 2 j_start += 1 elif j_start > j_end: #LL string += '5 ' moves += 1 i_start += 2 j_start -= 1 elif i_start == i_end and j_start > j_end: #L string += '6 ' moves += 1 j_start -= 2 spl = string.split(" ") spl.pop() spl = sorted(spl) for item in spl: tab.append(dic.get(item,item)) print(moves) print(" ".join(tab)) 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)