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 heapq import heappush, heappop

d={}
d['a']=0
d['b']=1
d['c']=2
d['d']=3
d['e']=4
d['f']=5
d['g']=6
d['h']=7


s=input()
t=input()


if s==t:
	print(0)


else:

	src=[7-int(s[1])+1, d[s[0]]]
	mdest=[7-int(t[1])+1, d[t[0]]]

	isrc, jsrc= src
	imdest, jmdest = mdest

	chess_board=[['#' for i in range(8)] for i in range(8)]

	cost=[[float('inf') for i in range(8)] for i in range(8)]

	pq=[(0, src, src)]

	while pq:
		wt, src, dest= heappop(pq)

		di, dj =dest
		si, sj= src

		if dest==mdest:

			if cost[dest[0]][dest[1]]>wt:
				cost[dest[0]][dest[1]]=wt

			if di==si+1 and dj==sj:
				chess_board[di][dj]=(si, sj)        #'D'  

			elif di==si-1 and dj==sj:
				chess_board[di][dj]=(si, sj)  #'U'

			elif dj==sj-1 and si==di:
				chess_board[di][dj]=(si, sj)  #'L'

			elif dj==sj+1 and si==di:
				chess_board[di][dj]=(si, sj)  #'R'


			elif dj==sj-1 and di==si-1:
				chess_board[di][dj]=(si, sj)  #'LU'

			elif dj==sj+1 and di==si+1:
				chess_board[di][dj]=(si, sj)  #'RD'

			elif dj==sj-1 and di==si+1:
				chess_board[di][dj]=(si, sj)  #'LD'

			else:
				chess_board[di][dj]=(si, sj)  #'RU'

			break

		if cost[di][dj]>wt:
			cost[di][dj]=wt 

			if di==si+1 and dj==sj:
				chess_board[di][dj]=(si, sj)  #'D'

			elif di==si-1 and dj==sj:
				chess_board[di][dj]=(si, sj)  #'U'

			elif dj==sj-1 and si==di:
				chess_board[di][dj]=(si, sj)  #'L'

			elif dj==sj+1 and si==di:
				chess_board[di][dj]=(si, sj)  #'R'


			elif dj==sj-1 and di==si-1:
				chess_board[di][dj]=(si, sj)  #'LU'

			elif dj==sj+1 and di==si+1:
				chess_board[di][dj]=(si, sj)  #'RD'

			elif dj==sj-1 and di==si+1:
				chess_board[di][dj]=(si, sj)  #'LD'

			else:
				chess_board[di][dj]=(si, sj)  #'RU'



			x_c=[-1, -1, -1, 0, 0, 1, 1, 1]
			y_c=[-1, 0, 1, -1, 1, -1, 0, 1]

			for i in range(8):

				if (0<=di+x_c[i]<8) and  (0<=dj+y_c[i]<8):

					ndest=[di+x_c[i], dj+y_c[i]]
					nweigh=wt+1

					heappush(pq, (nweigh, [di, dj], ndest))


	#print(*cost, sep='\n')

	#print()

	#print(*chess_board, sep='\n')

	#print(isrc, jsrc, imdest, jmdest)

	i=imdest 
	j=jmdest
	res=[]

	
	while i!=isrc and j!=jsrc:
		tempi, tempj=chess_board[i][j]

		if tempi==i-1 and tempj==j-1:
			res.append('RD')

		elif tempi==i-1 and tempj==j:
			res.append('D')

		elif tempi==i-1 and tempj==j+1:
			res.append('LD')

		elif tempi==i and tempj==j-1:
			res.append('R')

		elif tempi==i and tempj==j+1:
			res.append('L')

		elif tempi==i+1 and tempj==j-1:
			res.append('RU')

		elif tempi==i+1 and tempj==j:
			res.append('U')

		elif tempi==i+1 and tempj==j+1:
			res.append('LU')

		i, j =tempi, tempj

	print(cost[imdest][jmdest])
	print(*res[::-1], sep='\n')