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:

def shortestPath():
       kingPosition = input()
       destination = input()
       boardSize = 8
       chessBoard = [[-1 for x in range(boardSize)] for y in range(boardSize)]
       kingRow = int(kingPosition[1])-1
       kingColumn = ord(kingPosition[0])-ord('a')

       if kingPosition == destination:
              print(0)
              return 
       chessBoard[kingRow][kingColumn] = 0
       chessBoard[int(destination[1])-1][ord(destination[0])-ord('a')] = -2

       newNeighbors = []
       fillChessBoard(kingRow,kingColumn,chessBoard,newNeighbors)
       while len(newNeighbors) > 0:
              fillChessBoard(newNeighbors[0][0], newNeighbors[0][1],chessBoard,newNeighbors)
              newNeighbors.remove(newNeighbors[0])

       path=[[int(destination[1])-1,ord(destination[0])-ord('a')] ]
       path.append(findSmallestNeighbor([int(destination[1])-1,ord(destination[0])-ord('a')],chessBoard))
       while chessBoard[path[len(path)-1][0]][path[len(path)-1][1]] != 0:
              path.append(findSmallestNeighbor(path[len(path)-1],chessBoard))
       allNeighbors = [[1,1],[1,0],[1,-1],[0,-1],[-1,-1],[-1,0],[-1,1],[0,1]]
       i = len(path)-1

       print(len(path)-1)
       while i > 0:
              for neighbor in allNeighbors:
                     if path[i][0] + neighbor[0] == path[i-1][0] and path[i][1] + neighbor[1] == path[i-1][1]:
                            if neighbor == [1,1]:
                                   print('RU')
                            elif neighbor == [1,0]:
                                   print('U')
                            elif neighbor == [1,-1]:
                                   print('LU')
                            elif neighbor == [0,-1]:
                                   print('L')
                            elif neighbor == [-1,-1]:
                                   print('LD')
                            elif neighbor == [-1,0]:
                                   print('D')
                            elif neighbor == [-1,1]:
                                   print('RD')
                            elif neighbor == [0,1]:
                                   print('R')

              i -= 1




def fillChessBoard(startRow, startColumn, chessBoard, newNeighbors):
       allNeighbors = [[1,1],[1,0],[1,-1],[0,-1],[-1,-1],[-1,0],[-1,1],[0,1]]
       for neighbor in allNeighbors:

              if startRow + neighbor[0] < len(chessBoard) and startColumn + neighbor[1] < len(chessBoard) and startRow + neighbor[0] >= 0 and startColumn + neighbor[1] >= 0 and chessBoard[startRow + neighbor[0]][startColumn + neighbor[1]] == -1:
                     chessBoard[startRow + neighbor[0]][startColumn + neighbor[1]] = chessBoard[startRow][startColumn] + 1
                     newNeighbors.append([startRow + neighbor[0],startColumn + neighbor[1]])

def findSmallestNeighbor(current,chessBoard):
       allNeighbors = [[1,1],[1,0],[1,-1],[0,-1],[-1,-1],[-1,0],[-1,1],[0,1]]
       minValue = 8
   
       for neighbor in allNeighbors:
              if current[0] + neighbor[0] < len(chessBoard) and current[1] + neighbor[1] < len(chessBoard) and current[0] + neighbor[0] >= 0 and current[1] + neighbor[1] >= 0 and chessBoard[current[0]+neighbor[0]][current[1]+neighbor[1]] < minValue and chessBoard[current[0]+neighbor[0]][current[1]+neighbor[1]] != -2:
                     minValue =  chessBoard[current[0]+neighbor[0]][current[1]+neighbor[1]] 
                     minNeighbor = [current[0]+neighbor[0],current[1]+neighbor[1]]
       return minNeighbor

shortestPath()