#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # if ((i_start - i_end) % 2) or (not ((j_start - j_end) % 2) and j_start != j_end): # print('Impossible') # return moves = [] total_moves = 0 while not (i_start == i_end and j_start == j_end): if total_moves > 1000000: print('Impossible') return if i_start > i_end and j_start > j_end: moves.append('UL') i_start -= 2 j_start -= 1 elif i_start > i_end and j_start < j_end: moves.append('UR') i_start -= 2 j_start += 1 elif j_start < j_end - 1: moves.append('R') j_start += 2 elif i_start < i_end and j_start > j_end: moves.append('LL') i_start += 2 j_start -= 1 elif i_start < i_end and j_start < j_end: moves.append('LR') i_start += 2 j_start += 1 elif j_start > j_end + 1: moves.append('L') j_start -= 2 elif i_start > i_end and j_start == j_end: moves.append('UL') i_start -= 2 j_start -= 1 elif i_start < i_end and j_start == j_end: moves.append('LR') i_start += 2 j_start += 1 total_moves += 1 print(len(moves)) print(" ".join(str(x) for x in moves)) 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)