label l1; var pip: array [1..6] of string[2]=('UL','UR','R','LR','LL','L'); cot: array [1..6] of integer=(-2,-2,0,2, 2, 0); hang: array [1..6] of integer=(-1, 1,2,1,-1,-2); q,w,b,trace: array [0..40005] of longint; fre: array [0..200,0..200] of boolean; ans: array [0..40005] of string; n,sx,sy,ex,ey,f,l,u,v,x,y,bac,i,j: longint; yes: boolean; procedure print(); var s: ansistring; begin s:=''; writeln(b[l]); while l<>0 do begin s:=ans[l] + ' ' + s; l:=trace[l]; end; writeln(s); end; BEGIN read(n); read(sx,sy,ex,ey); for i:=0 to n-1 do for j:=0 to n-1 do fre[i,j]:=true; yes:=false; f:=0; l:=0; fre[sx,sy]:=false; q[0]:=sx; w[0]:=sy; b[0]:=0; trace[0]:=-1; repeat u:=q[f]; v:=w[f]; bac:=b[f] + 1; inc(f); for i:=1 to 6 do begin x:=u + cot[i]; y:=v + hang[i]; if (x >= 0) and (x < n) and (y >= 0) and (y < n) and fre[x,y] then begin inc(l); q[l]:=x; w[l]:=y; b[l]:=bac; trace[l]:=f-1; ans[l]:=pip[i]; fre[x,y]:=false; if (x = ex) and (y = ey) then begin yes:=true; goto l1; end; end; end; until f>l; l1: if not yes then writeln('Impossible') else print(); END.