import java.util.*; import java.io.*; class Vertex{ int x,y; int n=0; String mv=""; boolean known=false; Vertex prev; Vertex(int X,int Y){x=X;y=Y;} Vertex(int X,int Y,Vertex p,int c,String m){ x=X;y=Y; prev=p;n=c;mv=m; } void update(Vertex p,int c,String m){ prev=p; n=c; mv=m; } } class A{ InputStream s; PrintWriter o; A(){s=new DataInputStream(System.in);o=new PrintWriter(System.out);} public static void main(String[] args){new A().run();} int size; int sx,sy,ex,ey; void run(){ long startTime=System.currentTimeMillis(); size=i(); int[] a=arr(4); sx=a[0];sy=a[1];ex=a[2];ey=a[3]; solve(); long time=System.currentTimeMillis()-startTime; //o.println("Time taken:"+time+"ms"); o.flush(); } int[] xm={-2,2,-2,2,0,0}; int[] ym={-1,-1,1,1,-2,2}; String[] move={"UL","LL","UR","LR","L","R"}; void solve(){ Vertex[][] all=new Vertex[size][size]; boolean flag=false; Comparator comparator = new Comparator(){ @Override public int compare(Vertex s, Vertex p) { return s.n-p.n; } }; PriorityQueue h=new PriorityQueue(size*size,comparator); Vertex v=new Vertex(sx,sy); h.add(v); int a,b; while(!h.isEmpty()){ v=h.peek(); h.remove(v); if(v.x==ex && v.y==ey){ flag=true; break; } v.known=true; for(int i=0;i<6;i++){ a=v.x+xm[i];b=v.y+ym[i]; if(valid(a,b)){ if(all[a][b]==null){ all[a][b]=new Vertex(a,b,v,v.n+1,move[i]); h.add(all[a][b]); } if(v.n+1-1 && y>-1 && x=len){ index=0; try{ len=s.read(in); } catch (IOException e){ throw new InputMismatchException(); } if(len<=0)return -1; } return in[index++]; } private boolean isWhiteSpace(int ch){return ch==' '||ch=='\t'||ch=='\r'||ch=='\n'||ch==0x0B;} private String str(){ int b; while((b=r())!=-1 && isWhiteSpace(b)){} StringBuilder s = new StringBuilder(); while(!(isWhiteSpace(b))){ s.appendCodePoint(b); b=r(); } return s.toString(); } private char c(){ int b; while((b=r())!=-1 && isWhiteSpace(b)){} return (char)b; } private char[] carr(int n){ char[] ret=new char[n]; int b,p=0; while((b=r())!=-1 && isWhiteSpace(b)){} while(p='0' && b<='9') || b=='-')); if(b=='-'){ minus=true; b=r(); } while(true){ if(b>='0' && b<='9') n=n*10+(b-'0'); else return minus?-n:n; b=r(); } } private long l(){ long num = 0; int b; boolean minus = false; while((b = r()) != -1 && !((b >= '0' && b <= '9') || b == '-')); if(b == '-'){ minus = true; b = r(); } while(true){ if(b >= '0' && b <= '9') num = num * 10 + (b - '0'); else return minus ? -num : num; b = r(); } } }