Problem: The king is left alone on the chessboard. In spite of this loneliness, he doesn't lose heart, because he has business of national importance. For example, he has to pay an official visit to square t. As the king is not in habit of wasting his time, he wants to get from his current position s to square t in the least number of moves. Help him to do this.

<image>

In one move the king can get to the square that has a common side or a common vertex with the square the king is currently in (generally there are 8 different squares he can move to).

Input

The first line contains the chessboard coordinates of square s, the second line — of square t.

Chessboard coordinates consist of two characters, the first one is a lowercase Latin letter (from a to h), the second one is a digit from 1 to 8.

Output

In the first line print n — minimum number of the king's moves. Then in n lines print the moves themselves. Each move is described with one of the 8: L, R, U, D, LU, LD, RU or RD. 

L, R, U, D stand respectively for moves left, right, up and down (according to the picture), and 2-letter combinations stand for diagonal moves. If the answer is not unique, print any of them. 

Examples

Input

a8
h1


Output

7
RD
RD
RD
RD
RD
RD
RD

Solution (in PYTHON3):

Solution:
#BFS Problem 
#First let's make the graph:
#Then just do a BFS to get the path:
#V:->64
#G={}
#for i in range(2,8):
#    for j in range(2,8):
#        #genrate adjecent vertices:
#        L=str(i)+chr(64+j-1)     #LEFT
#        R=str(i)+chr(64+j+1)     #Right
#        U=str(i+1)+chr(64+j)     #UP
#        D=str(i-1)+chr(64+j)     #Down
#        LD=str(i-1)+chr(64+j-1)  #LeftDown
#        LU=str(i+1)+chr(64+j-1)  #LeftUp
#        RD=str(i-1)+chr(64+j+1)  #RightDown
#        RU=str(i+1)+chr(64+j+1)  #RightUP
#        G[str(i)+chr(64+j)]=[L,R,U,D,LD,LU,RD,RU]
#G["1A"]=["1B","2B","2A"]  #1A
#G["8A"]=["8B","7B","7A"]  #8A
#G["1H"]=["2G","1G","2H"]  #1H
#G["8H"]=["7G","8G","7H"]  #8H
#This Left Column
#for i in range(2,8):
#    G[str(i)+"A"]=[str(i-1)+"A",str(i+1)+"A",str(i)+"B",str(i-1)+"B",str(i+1)+"B"]
#This Right Column
#for i in range(2,8):
#    G[str(i)+"H"]=[str(i-1)+"H",str(i+1)+"H",str(i)+"G",str(i-1)+"G",str(i+1)+"G"]
#This Bottom Column
#for i in range(2,8):
#    G["1"+chr(64+i)]=["1"+chr(64+i-1),"1"+chr(64+i+1),"2"+chr(64+i),"2"+chr(64+i+1),"2"+chr(64+i-1)]
#This Top column
#for i in range(2,8):
#   G["8"+chr(64+i)]=["8"+chr(64+i-1),"8"+chr(64+i+1),"7"+chr(64+i),"7"+chr(64+i+1),"7"+chr(64+i-1)]

#print(G)
G={'5F': ['5E', '5G', '6F', '4F', '4E', '6E', '4G', '6G'], '1H': ['2G', '1G', '2H'], '6C': ['6B', '6D', '7C', '5C', '5B', '7B', '5D', '7D'], '3D': ['3C', '3E', '4D', '2D', '2C', '4C', '2E', '4E'], '6F': ['6E', '6G', '7F', '5F', '5E', '7E', '5G', '7G'], '8B': ['8A', '8C', '7B', '7C', '7A'], '2H': ['1H', '3H', '2G', '1G', '3G'], '5A': ['4A', '6A', '5B', '4B', '6B'], '3C': ['3B', '3D', '4C', '2C', '2B', '4B', '2D', '4D'], '4F': ['4E', '4G', '5F', '3F', '3E', '5E', '3G', '5G'], '5C': ['5B', '5D', '6C', '4C', '4B', '6B', '4D', '6D'], '6E': ['6D', '6F', '7E', '5E', '5D', '7D', '5F', '7F'], '5D': ['5C', '5E', '6D', '4D', '4C', '6C', '4E', '6E'], '2B': ['2A', '2C', '3B', '1B', '1A', '3A', '1C', '3C'], '8E': ['8D', '8F', '7E', '7F', '7D'], '7C': ['7B', '7D', '8C', '6C', '6B', '8B', '6D', '8D'], '2G': ['2F', '2H', '3G', '1G', '1F', '3F', '1H', '3H'], '3A': ['2A', '4A', '3B', '2B', '4B'], '4D': ['4C', '4E', '5D', '3D', '3C', '5C', '3E', '5E'], '4H': ['3H', '5H', '4G', '3G', '5G'], '6B': ['6A', '6C', '7B', '5B', '5A', '7A', '5C', '7C'], '5B': ['5A', '5C', '6B', '4B', '4A', '6A', '4C', '6C'], '4A': ['3A', '5A', '4B', '3B', '5B'], '8D': ['8C', '8E', '7D', '7E', '7C'], '4B': ['4A', '4C', '5B', '3B', '3A', '5A', '3C', '5C'], '8C': ['8B', '8D', '7C', '7D', '7B'], '8G': ['8F', '8H', '7G', '7H', '7F'], '1C': ['1B', '1D', '2C', '2D', '2B'], '4G': ['4F', '4H', '5G', '3G', '3F', '5F', '3H', '5H'], '8A': ['8B', '7B', '7A'], '6A': ['5A', '7A', '6B', '5B', '7B'], '2F': ['2E', '2G', '3F', '1F', '1E', '3E', '1G', '3G'], '4C': ['4B', '4D', '5C', '3C', '3B', '5B', '3D', '5D'], '7H': ['6H', '8H', '7G', '6G', '8G'], '2E': ['2D', '2F', '3E', '1E', '1D', '3D', '1F', '3F'], '2A': ['1A', '3A', '2B', '1B', '3B'], '2C': ['2B', '2D', '3C', '1C', '1B', '3B', '1D', '3D'], '1B': ['1A', '1C', '2B', '2C', '2A'], '3E': ['3D', '3F', '4E', '2E', '2D', '4D', '2F', '4F'], '5E': ['5D', '5F', '6E', '4E', '4D', '6D', '4F', '6F'], '7D': ['7C', '7E', '8D', '6D', '6C', '8C', '6E', '8E'], '8F': ['8E', '8G', '7F', '7G', '7E'], '3H': ['2H', '4H', '3G', '2G', '4G'], '7B': ['7A', '7C', '8B', '6B', '6A', '8A', '6C', '8C'], '1A': ['1B', '2B', '2A'], '7A': ['6A', '8A', '7B', '6B', '8B'], '7G': ['7F', '7H', '8G', '6G', '6F', '8F', '6H', '8H'], '5G': ['5F', '5H', '6G', '4G', '4F', '6F', '4H', '6H'], '3B': ['3A', '3C', '4B', '2B', '2A', '4A', '2C', '4C'], '7E': ['7D', '7F', '8E', '6E', '6D', '8D', '6F', '8F'], '1G': ['1F', '1H', '2G', '2H', '2F'], '2D': ['2C', '2E', '3D', '1D', '1C', '3C', '1E', '3E'], '6G': ['6F', '6H', '7G', '5G', '5F', '7F', '5H', '7H'], '6D': ['6C', '6E', '7D', '5D', '5C', '7C', '5E', '7E'], '8H': ['7G', '8G', '7H'], '1F': ['1E', '1G', '2F', '2G', '2E'], '5H': ['4H', '6H', '5G', '4G', '6G'], '3G': ['3F', '3H', '4G', '2G', '2F', '4F', '2H', '4H'], '3F': ['3E', '3G', '4F', '2F', '2E', '4E', '2G', '4G'], '1D': ['1C', '1E', '2D', '2E', '2C'], '6H': ['5H', '7H', '6G', '5G', '7G'], '4E': ['4D', '4F', '5E', '3E', '3D', '5D', '3F', '5F'], '1E': ['1D', '1F', '2E', '2F', '2D'], '7F': ['7E', '7G', '8F', '6F', '6E', '8E', '6G', '8G']}
#Graph Has been generated Now Apply BFS:->
def BFS(G,start,end):
    #USE QUEUE
    #Visited
    visited=[start]
    queue=[start]
    level_is={i:-1 for i in G.keys()}
    level_is[start]=0
    while queue!=[]:
        #Get the top of the frontier
        top=queue.pop(0)
        if top==end:
            return level_is
        for i in G[top]:
            if i not in visited:
                if level_is[i]==-1:
                    level_is[i]=level_is[top]+1
                visited.append(i)
                queue.append(i)

       

def get_path(level_is,end,start):
    #start from end and build a list till you reach the start
    p=[]
    while end!=start:
        p.append(end)
        for i in G[end]:
            if level_is[i]==level_is[end]-1:
                end=i
                continue
            else:
                pass
    p.append(start)
    return p[::-1]

def moves_generator(path):
    move=[]
    for i in range(1,len(path)):
        a=path[i]
        b=path[i-1]
        if a[0]==b[0]:
            #8x 8y case
            if a[1]<b[1]:
                #8C->8B:
                move.append("L")
            elif a[1]>b[1]:
                #8B->8C:
                move.append("R")
        elif a[1]==b[1]:
            if int(a[0])<int(b[0]):
                #6D->5D:
                move.append("D")
            elif int(a[0])>int(b[0]):
                #5D->6D
                move.append("U")
        else:
            # 3A->4B "RU"
            if int(a[0])==int(b[0])+1 and ord(a[1])==ord(b[1])+1:
                move.append("RU")
            # 3A->2B "RD"
            elif int(a[0])==int(b[0])-1 and ord(a[1])==ord(b[1])+1:
                move.append("RD")
            # 5D->6C "LU"
            elif int(a[0])==int(b[0])+1 and ord(a[1])==ord(b[1])-1:
                move.append("LU")
            # 5D->4C "LD"    
            elif int(a[0])==int(b[0])-1 and ord(a[1])==ord(b[1])-1:
                move.append("LD")
    print(len(move))
    for i in move:
        print(i)

start=input()
end=  input()
start=start.capitalize()[::-1]
end=end.capitalize()[::-1]
if end in G[start]:
    moves_generator([start,end]) 
else:
    level_is=BFS(G,start,end)
    path=get_path(level_is,end,start)
    moves_generator(path)
#How to get Optimization ... next vertex choosen will be the one having distance closest to end