from collections import deque def printShortestPath(n, i_start, j_start, i_end, j_end): # Print the distance along with the sequence of moves. todo = deque([(i_start, j_start,[])]) visited = [list([False]*n) for _ in range(n)] while todo: i,j,path = todo.popleft() if i == i_end and j == j_end: print(len(path)) print(*path) return for di,dj,dir in [(-2,-1,'UL'),(-2,1,'UR'),(0,2,'R'),(2,1,'LR'),(2,-1,'LL'),(0,-2,'L')]: i2, j2 = i+di, j+dj if 0 <= i2 < n and 0 <= j2 < n and not visited[i2][j2]: todo.append((i2,j2,path+[dir])) visited[i2][j2] = True print('Impossible') 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)