from collections import deque def printShortestPath(n, i_s, j_s, i_e, j_e): dist = [[None] * n for _ in range(n)] pth = [[None] * n for _ in range(n)] d = [(-2, -1, 'UL'), (-2, 1, 'UR'), (0, 2, 'R'), (2, 1, 'LR'), (2, -1, 'LL'), (0, -2, 'L'), (0, 2, 'R')] q = deque() q.append((i_s, j_s)) dist[i_s][j_s] = 0 while q: i, j = q.popleft() for u, v, s in ((i + di, j + dj, s) for di, dj, s in d): if all(0 <= x < n for x in (u, v)) and dist[u][v] is None: dist[u][v] = dist[i][j] + 1 pth[u][v] = i, j, s if (u, v) == (i_e, j_e): print(dist[u][v]) p = i, j, s l = [] while p: l.append(p[2]) p = pth[p[0]][p[1]] print(*reversed(l)) return q.append((u, v)) 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)