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
from typing import List


# 将每个位置表示成一个单独的数字
def position_to_number(pos: str) -> int:
    col, row = pos
    return int(row) * 8 + ord(col) - ord('a')


# 将数字表示的位置转换为字符串
def number_to_position(num: int) -> str:
    return chr(num % 8 + ord('a')) + str(num // 8)


# 获取某一位置所有合法的下一步位置
def get_next_positions(pos: int) -> List[int]:
    row, col = divmod(pos, 8)
    directions = [
        (-1, -1), (-1, 0), (-1, 1),
        (0, -1), (0, 1),
        (1, -1), (1, 0), (1, 1)
    ]
    res = []
    for dx, dy in directions:
        x, y = row + dx, col + dy
        if x >= 0 and y >= 0 and x < 8 and y < 8:
            res.append(x * 8 + y)
    return res


# BFS求解最短路径
def bfs(start: int, end: int) -> List[str]:
    q = deque([(start, [number_to_position(start)])])
    visited = set()
    while q:
        cur_pos, cur_path = q.popleft()
        if cur_pos == end:
            return cur_path
        if cur_pos in visited:
            continue
        visited.add(cur_pos)
        for next_pos in get_next_positions(cur_pos):
            next_path = cur_path + [number_to_position(next_pos)]
            q.append((next_pos, next_path))


# 输入棋盘坐标
start_pos = input()
end_pos = input()

# 将坐标转换成数字
start = position_to_number(start_pos)
end = position_to_number(end_pos)

# BFS求解最短路径
path = bfs(start, end)


# 输出路径
print(len(path) - 1)
for i in range(len(path) - 1):
    # 将字符串位置转换为整数
    pi, pj = map(position_to_number, (path[i], path[i + 1]))
    ci, cj = divmod(pi, 8)
    ni, nj = divmod(pj, 8)
    # 输出每一步的移动方向
    if ci == ni and cj > nj:
        print('L', end='')
    elif ci == ni and cj < nj:
        print('R', end='')
    elif cj == nj and ci > ni:
        print('U', end='')
    elif cj == nj and ci < ni:
        print('D', end='')
    elif pi - pj == 7:
        print('LU', end='')
    elif pi - pj == 9:
        print('RU', end='')
    elif pj - pi == 7:
        print('LD', end='')
    elif pj - pi == 9:
        print('RD', end='')
    print()