#!/bin/python import sys from heapq import heappush, heappop def printShortestPath(n, x, y, a, b): q = [(x,y)] dp = {} dp[(x, y)] = None while len(q) > 0: x, y = q.pop(0) if x == a and y == b: break if x >= 2 and y >= 1 and (x-2, y-1) not in dp: q.append((x-2, y-1)) dp[(x-2, y-1)] = (x, y, 'UL') if x >= 2 and y < n-1 and (x-2, y+1) not in dp: q.append((x-2, y+1)) dp[(x-2, y+1)] = (x, y, 'UR') if y < n-2 and (x, y+2) not in dp: q.append((x, y+2)) dp[(x, y+2)] = (x, y, 'R') if x < n-2 and y < n-1 and (x+2, y+1) not in dp: q.append((x+2, y+1)) dp[(x+2, y+1)] = (x, y, 'LR') if x < n-2 and y >= 1 and (x+2, y-1) not in dp: q.append((x+2, y-1)) dp[(x+2, y-1)] = (x, y, 'LL') if y >= 2 and (x, y-2) not in dp: q.append((x, y-2)) dp[(x, y-2)] = (x, y, 'L') if (a, b) not in dp: print 'Impossible' else: now = dp[(a, b)] ll = [] while now is not None: ll.append(now[2]) now = dp[(now[0], now[1])] ll.reverse() print len(ll) print ' '.join(ll) if __name__ == "__main__": n = int(raw_input().strip()) i_start, j_start, i_end, j_end = map(int, raw_input().strip().split(' ')) printShortestPath(n, i_start, j_start, i_end, j_end)