from collections import defaultdict from itertools import product n = int(input()) x1, y1, x2, y2 = map(int, input().strip().split()) start, end = (x1, y1), (x2, y2) dist = defaultdict(lambda: float('inf')) dist[end] = 0 for _ in range(n*n+1): unchanged = True for x, y in product(range(n), range(n)): val = 1+min(dist[ x,y-2], dist[x+2,y+1], dist[x-2,y-1], dist[ x,y+2], dist[x-2,y+1], dist[x+2,y-1]) if val < dist[x,y]: dist[x,y] = val unchanged = False if unchanged: break if dist[start] == float('inf'): print('Impossible') else: x, y = start path = [] while (x,y) != end: d = dist[x, y] if dist[x-2, y-1] == d-1: path.append('UL') x, y = x-2, y-1 elif dist[x-2, y+1] == d-1: path.append('UR') x, y = x-2, y+1 elif dist[x, y+2] == d-1: path.append('R') x, y = x, y+2 elif dist[x+2, y+1] == d-1: path.append('LR') x, y = x+2, y+1 elif dist[x+2, y-1] == d-1: path.append('LL') x, y = x+2, y-1 elif dist[x, y-2] == d-1: path.append('L') x, y = x, y-2 print(dist[start]) print(*path, sep=' ')