from collections import deque def parseInput(s): return [int(x) for x in s.split()] def printShortestPath(n, i_start, j_start, i_end, j_end): dirs = [(-2, -1, "UL"), (-2, 1, "UR"), (0, 2, "R"), (2, 1, "LR"), (2, -1, "LL"), (0, -2, "L")] grid=[[0 for j in range(n)] for i in range(n)] grid[i_start][j_start]=1 q=deque() q.append([(i_start,j_start)]) while q: current=q.popleft() posx,posy=current[-1][0],current[-1][1] for dx,dy,name in dirs: nx,ny=posx+dx,posy+dy if 0 <= nx < n and 0 <= ny < n: if (nx,ny) == (i_end,j_end): print(len(current)) print(" ".join(point[2] for point in current if len(point) == 3)+" "+name) return elif grid[nx][ny]: #already visited pass else: grid[nx][ny]=1 q.append(current+[(nx,ny,name)]) print("Impossible") return 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)