#!/bin/python3 from collections import defaultdict as dd n=int(input()) a=n s1,s2,e1,e2=[int(i) for i in input().split()] r1,r2=e1,e2 g=dd(list) for i in range(n): for j in range(n): if i-2>=0 and j-1>=0: g[(i,j)].append(((i-2,j-1),'UL')) if i-2>=0 and j+1=0: g[(i,j)].append(((i+2,j-1),'LL')) if i=0: g[(i,j)].append(((i,j-2),'L')) d=[] ch=[[0 for i in range(a+1)] for j in range(a+1)] dis=[[[] for i in range(a+1)] for j in range(a+1)] #or=[[0 for i in range(a+1)] for j in range(a+1)] def bfs(i,j): ch[s1][s2]=1 d.append([s1,s2]) while(d): k=d.pop(0) for i in g[(k[0],k[1])]: if ch[i[0][0]][i[0][1]]==0: ch[i[0][0]][i[0][1]]=1 #or[i[0][0]][i[0][1]]=[k[0],k[1]] d.append([i[0][0],i[0][1]]) dis[i[0][0]][i[0][1]]=[k[0],k[1]] if ch[e1][e2]==1: break def ret(i,j,k,l): if k+2==i and l+1==j: return 'UL' elif k+2==i and l-1==j: return 'UR' elif k==i and l-2==j: return 'R' elif k-2==i and l-1==j: return 'LR' elif k-2==i and l+1==j: return 'LL' elif k==i and l+2==j: return 'L' bfs(s1,s2) #for i in dis: # print(*i) path=[] while(len(dis[e1][e2])!=0): path.append(dis[e1][e2]) e1,e2=dis[e1][e2] if len(path)==0: print("Impossible") else: print(len(path)) k=[] path1=path[::-1]+[[r1,r2]] #print(path1) for i in range(len(path1)-1): k.append(ret(path1[i][0],path1[i][1],path1[i+1][0],path1[i+1][1])) print(*k)