#!/bin/python import sys def printShortestPath(n, i_start, j_start, i_end, j_end): i_start, j_start = j_start, i_start i_end, j_end = j_end, i_end if (j_start - j_end) % 4 == 1 or (j_start - j_end) % 4 == 3: print("Impossible") elif (i_start - i_end) % 2 == 1 and (j_start - j_end) % 4 == 0: print("Impossible") elif (i_start - i_end) % 2 == 0 and (j_start - j_end) % 4 == 2: print("Impossible") else: count = 0 moveStr = "" x = i_start y = j_start while (x,y) != (i_end,j_end): count += 1 if y > j_end: if x < i_end: moveStr += "UR " x += 1 y -= 2 else: moveStr += "UL " x -= 1 y -= 2 elif y == j_end: if x < i_end: moveStr += "R " x += 2 else: moveStr += "L " x -= 2 else: if x <= i_end: moveStr += "LR " x += 1 y += 2 else: moveStr += "LL " x -= 1 y += 2 print(count) print(moveStr) # Print the distance along with the sequence of 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)