#!/bin/python3 import sys def printShortestPath(n, y, x, endY, endX): # Print the distance along with the sequence of moves. #print((endX,endY)) found=False steps=[] while(not(x>n-1 or x<0 or y>n-1 or y<0)): if(x==endX and y==endY): found=True break #right if(endX>x and endY==y): while(x0): #print("LEFT") if(endX==x): found=True x=n+2 break x-=2 steps.append("L") #print((x,y)) #upperleft if(endX<=x and endY=x and endY=x and endY>y): steps.append("LR") x+=1 y+=2 #LL elif(endX<=x and endY>y): steps.append("LL") x-=1 y+=2 else: pass #print((x,y)) if found: print(len(steps)) print(" ".join(steps)) else: print("Impossible") n = int(input().strip()) i_start, j_start, i_end, j_end = input().strip().split(' ') i_start, j_start, i_end, j_end = [int(i_start), int(j_start), int(i_end), int(j_end)] printShortestPath(n, i_start, j_start, i_end,j_end)