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.
class Queue:    # initializing the queue
    def __init__(self):
        self.head = []
        self.tail = []

    def __len__(self):
        return len(self.head + self.tail)

    def queue(self, item):
        self.tail.append(item)

    def dequeue(self):
        if not self.head:
            self.head = self.tail[::-1]
            self.tail = []
            return self.head.pop()
        else:
            return self.head.pop()


moves = {(-1, 0): 'L', (1, 0): 'R', (0, 1): 'U', (0, -1): 'D', (-1, 1): 'LU', (-1, -1): 'LD', (1, 1): 'RU',(1, -1): 'RD'}


def move(path):
    for i in range(len(path) - 1):
        move = (path[i+1][0] - path[i][0], path[i+1][1] - path[i][1])
        print(moves[move])


def backtrack(destination, seen, start):    # counts backwards when the destination node is found
    node = destination
    path = [destination]
    while node != start:
        node = seen[node]
        path.append(node)
    print(len(path) - 1)
    move(path[::-1])



def breadth_first_search(graph, start, destination):    # A shortest path algorithm utilizing a bfs
    queue = Queue()
    queue.queue(start)
    seen = {start: None}
    while queue:
        current_node = queue.dequeue()
        for neighbour in graph[current_node]:
            if neighbour not in seen:
                queue.queue(neighbour)
                seen[neighbour] = current_node
        if current_node == destination:
            return backtrack(destination, seen, start)


def adjacent(i, j):     # creating an adjacent function to speed up the initialization of the chess board graph
    list = [-1, 0, 1]
    adjacent = []
    for a in list:
        for b in list:
            if (a,b) != (0,0) and 1 <= i + a <= 8 and 1 <= j + b <= 8:
                adjacent.append((i + a, j + b))
    return adjacent


graph = {}  # initializing the chess board graph
for i in range(1, 9):
    for j in range(1, 9):
        graph[(i, j)] = adjacent(i, j)

letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
number_to_letter = { letters[i]: i + 1 for i in range(8)}


input_start = input()
input_destination = input()
start = (number_to_letter[input_start[0]], int(input_start[1]))
destination = (number_to_letter[input_destination[0]], int(input_destination[1]))


breadth_first_search(graph, start, destination)

test_path = [(1, 4), (1, 5), (2, 6), (3, 7), (4, 8)]
