#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): #order = ["UL", "UR", "R", "LR", "LL", "L"] r_diff = i_end - i_start c_diff = j_end - j_start r_steps = abs(r_diff) / 2 instructions = [] if r_steps * 2 == abs(r_diff): if (abs(c_diff) - r_steps) % 2 == 0: i_cursor = i_start j_cursor = j_start while (i_cursor != i_end or j_cursor != j_end): #print instructions, (i_cursor, i_end), (j_cursor, j_end) if i_cursor > i_end: # up if j_cursor >= j_end: #while (i_cursor > i_end): if j_cursor - 1 >= 0: instructions.append("UL") j_cursor -= 1 i_cursor -= 2 #else: #break else: #while (i_cursor > i_end): if j_cursor + 1 < n: instructions.append("UR") j_cursor += 1 i_cursor -= 2 #else: #break elif j_cursor < j_end and (j_end - j_cursor) % 2 == 0: # right #while (j_cursor < j_end): instructions.append("R") j_cursor += 2 elif i_cursor < i_end: # down if j_cursor < j_end or (j_cursor == j_end and j_end < (n-1)): #while (i_cursor < i_end): if j_cursor + 1 < n: instructions.append("LR") j_cursor += 1 i_cursor += 2 #else: #break else: #while (i_cursor < i_end): if j_cursor - 1 >= 0: instructions.append("LL") j_cursor -= 1 i_cursor += 2 #lse: #break elif j_cursor > j_end: # left #while (j_cursor > j_end): instructions.append("L") j_cursor -= 2 if len(instructions) == 0: print "Impossible" else: print len(instructions) print " ".join(instructions) if __name__ == "__main__": n = int(raw_input().strip()) i_start, j_start, i_end, j_end = raw_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)