#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end, num, steps): if abs(i_start - i_end)%2 != 0: print("Impossible") return elif abs(i_start - i_end)%4 == 0 and abs(j_start - j_end)%2 != 0: print("Impossible") return elif abs(i_start - i_end)%4 != 0 and abs(j_start - j_end)%2 == 0: print("Impossible") return if i_start == i_end and j_start == j_end: print(num) print(steps) return if i_start > i_end and j_start >= j_end: num += 1 steps += "UL " printShortestPath(n, i_start - 2, j_start - 1, i_end, j_end, num, steps) return elif i_start > i_end: num += 1 steps += "UR " printShortestPath(n, i_start - 2, j_start + 1, i_end, j_end, num, steps) return elif i_start == i_end and j_start < j_end: num += 1 steps += "R " printShortestPath(n, i_start, j_start + 2, i_end, j_end, num, steps) return elif i_start < i_end and j_start <= j_end: num += 1 steps += "LR " printShortestPath(n, i_start + 2, j_start + 1, i_end, j_end, num, steps) return elif i_start < i_end and j_start > j_end: num += 1 steps += "LL " printShortestPath(n, i_start + 2, j_start - 1, i_end, j_end, num, steps) return else: num += 1 steps += "L " printShortestPath(n, i_start, j_start - 2, i_end, j_end, num, steps) return # Print the distance along with the sequence of moves. if __name__ == "__main__": n = int(input().strip()) i_start, j_start, i_end, j_end = [int(x) for x in input().strip().split(' ')] num = 0 steps = "" printShortestPath(n, i_start, j_start, i_end, j_end, num, steps)