from collections import deque def main(): n = int(input()) x1, y1, x2, y2 = map(int, input().split()) dist = {(x1, y1): 0} prev = {(x1, y1): None} q = deque([(x1, y1)]) moves = [(-2, -1, 'UL'), (-2, 1, 'UR'), (0, 2, 'R'), (2, 1, 'LR'), (2, -1, 'LL'), (0, -2, 'L')] while q and (x2, y2) not in prev: x, y = q.popleft() for dx, dy, label in moves: nx, ny = x + dx, y + dy if 0 <= nx < n and 0 <= ny < n and (nx, ny) not in dist: dist[(nx, ny)] = dist[(x, y)] + 1 prev[(nx, ny)] = label q.append((nx, ny)) if (x2, y2) not in prev: print('Impossible') return x, y = x2, y2 stk = [] while (x, y) != (x1, y1): stk.append(prev[(x, y)]) for dx, dy, label in moves: if label == prev[(x, y)]: x -= dx y -= dy break print(len(stk)) print(' '.join(reversed(stk))) main()