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.

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).
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.
from collections import deque
import heapq


class Grafo:
    def __init__(self):
        self.grafo = {}

    def adicionar_vertice(self, vertice):
        if vertice not in self.grafo:
            self.grafo[vertice] = []

    def adicionar_aresta(self, vertice1, vertice2):
        if vertice1 in self.grafo:
            self.grafo[vertice1].append(vertice2)
        else:
            self.grafo[vertice1] = [vertice2]

    
    def bfs_shortest_path(self, start, end):
        queue = deque()
        queue.append([start])
        visited = set()

        if start == end:
            return [start]

        while queue:
            path = queue.popleft()
            node = path[-1]

            if node not in visited:
                neighbors = self.grafo[node]
                for neighbor in neighbors:
                    new_path = list(path)
                    new_path.append(neighbor)
                    queue.append(new_path)

                    if neighbor == end:
                        return new_path

                visited.add(node)

    

tabuleiro = Grafo()
for i in range(1, 65):
    tabuleiro.adicionar_vertice(i)

for i in range(1, 65):
    if i % 8 != 0:
        tabuleiro.adicionar_aresta(i, i+1) #right
    
    if i % 8 != 1:
        tabuleiro.adicionar_aresta(i, i-1) #left
    
    if i < 57:
        tabuleiro.adicionar_aresta(i, i+8)#down

    if i > 8:
        tabuleiro.adicionar_aresta(i, i-8)#up

    if i > 8 and i % 8 != 0:
        tabuleiro.adicionar_aresta(i, i-7) #upright
    
    if i > 8 and i % 8 != 1:
        tabuleiro.adicionar_aresta(i, i-9) #upleft
    
    if i < 57 and i % 8 != 0:
        tabuleiro.adicionar_aresta(i, i+9) #downright

    if i < 57 and i % 8 != 1:
        tabuleiro.adicionar_aresta(i, i+7) #downleft


letras_para_numeros = [1,2,3,4,5,6,7,8]

def numero_da_casa(posicao):
    letra = posicao[0]
    numero = int(posicao[1])
    x = ord(letra) - 97
    numero_da_letra = letras_para_numeros[x]
    numero_da_casa = (8 *numero_da_letra) - (numero - 1)

    return numero_da_casa

input1 = input()
partida = numero_da_casa(input1)

input2 = input()
chegada = numero_da_casa(input2)

caminho = tabuleiro.bfs_shortest_path(partida, chegada)
print(len(caminho) - 1)
pos = partida
for i in caminho:
    if i == pos + 1:
        print("R")

    if i == pos - 1:
        print("L")
    
    if i == pos - 8:
       print("U")
    
    if i == pos + 8:
        print("D")

    if i == pos - 7:
        print("RU")
    
    if i == pos - 9:
        print("LU")

    if i == pos + 7:
        print("LD")

    if i == pos + 9:
        print("RD")

    pos = i
	 		      					    		 		  	   	