import Queue class Cell(object): def __init__(self, i, j, parent, move): self.id = (i, j) self.parent = parent self.move = move def nextcells(i, j): cells = [] if(i > 1): if(j > 0): cells.append((i - 2, j - 1, 'UL')) if(j < n - 1): cells.append((i - 2, j + 1, 'UR')) if(j < n - 2): cells.append((i, j + 2, 'R')) if(i < n - 2): if(j < n - 1): cells.append((i + 2, j + 1, 'LR')) if(j > 0): cells.append((i + 2, j - 1, 'LL')) if(j > 1): cells.append((i, j - 2, 'L')) return cells def bfs(si, sj, di, dj): q = Queue.Queue() q.put(Cell(si, sj, None, None)) visited = [] for i in range(n): visited.append([False] * n) visited[si][sj] = True while not q.empty(): cel = q.get() if((cel.id[0], cel.id[1]) == (di, dj)): return cel cells = nextcells(cel.id[0], cel.id[1]) for (k, l, m) in cells: if(not(visited[k][l])): visited[k][l] = True q.put(Cell(k, l, cel, m)) return None n = int(raw_input()) starti, startj, desti, destj = map(int, raw_input().strip().split(' ')) last = bfs(starti, startj, desti, destj) if(last is None): print 'Impossible' else: count = 0 path = [] while not(last.parent is None): path.append(last.move) last = last.parent count += 1 print count for move in path[::-1]: print move,