#!/bin/python3 import sys def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves i = i_start j = j_start def dist(si, sj, ei, ej): return ((si-ei)**2 + (sj-ej)**2)**0.5 def ul(): # print(dist(i, j, i_end, j_end) > dist(i-2, j1000, i_end, j_end)) a = dist(i, j, i_end, j_end) b = dist(i-2, j- 1, i_end, j_end) if a > b: return b return 1000 def ur(): a = dist(i, j, i_end, j_end) b = dist(i-2, j+1, i_end, j_end) if a > b: return b return 1000 def r(): a = dist(i, j, i_end, j_end) b = dist(i, j+2, i_end, j_end) if a > b: return b return 1000 def l(): a = dist(i, j, i_end, j_end) b = dist(i, j-2, i_end, j_end) if a > b: return b return 1000 def ll(): a = dist(i, j, i_end, j_end) b = dist(i+2, j - 1, i_end, j_end) if a > b: return b return 1000 def lr(): a = dist(i, j, i_end, j_end) b = dist(i+2, j+1, i_end, j_end) if a > b: return b return 1000 req = [] while True: d = [ul(), ur(), r(), lr(), ll(), l()] if i == i_end and j == j_end: break if i >= n or j >= n or i < 0 or j < 0: print("Impossible") return None index = d.index(min(d)) if index == 0: i = i - 2 j -= 1 req.append("UL") continue if index == 1: i -= 2 j += 1 req.append("UR") continue if index == 2: j += 2 req.append("R") continue if index == 3: i += 2 j += 1 req.append("LR") continue if index == 4: i += 2 j -= 1 req.append("LL") continue if index == 5: j -= 2 req.append("L") continue print("Impossible") return None print(len(req)) for i in req: print(i, end=' ') print() return None 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)