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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Scanner;

public class P3A {

	public static void main(String[] args)throws IOException {
		
		Scanner scanner = new Scanner (System.in);
		String start = scanner.nextLine();
		String end = scanner.nextLine();
		
		int[] startCoords = new int [2];
		startCoords[1] = Integer.parseInt(start.substring(1, 2));
		int[] endCoords = new int [2];
		endCoords[1] = Integer.parseInt(end.substring(1, 2));
		
		int numOfMoves;
		String moves;
		
		//The numerical equivalents of the letters are stored in the array
		if (start.charAt(0) == 'a')
			startCoords[0] = 1;
		else if (start.charAt(0) == 'b')
			startCoords[0] = 2;
		else if (start.charAt(0) == 'c')
			startCoords[0] = 3;
		else if (start.charAt(0) == 'd')
			startCoords[0] = 4;
		else if (start.charAt(0) == 'e')
			startCoords[0] = 5;
		else if (start.charAt(0) == 'f')
			startCoords[0] = 6;
		else if (start.charAt(0) == 'g')
			startCoords[0] = 7;
		else if (start.charAt(0) == 'h')
			startCoords[0] = 8;
		
		if (end.charAt(0) == 'a')
			endCoords[0] = 1;
		else if (end.charAt(0) == 'b')
			endCoords[0] = 2;
		else if (end.charAt(0) == 'c')
			endCoords[0] = 3;
		else if (end.charAt(0) == 'd')
			endCoords[0] = 4;
		else if (end.charAt(0) == 'e')
			endCoords[0] = 5;
		else if (end.charAt(0) == 'f')
			endCoords[0] = 6;
		else if (end.charAt(0) == 'g')
			endCoords[0] = 7;
		else if (end.charAt(0) == 'h')
			endCoords[0] = 8;
		
		int horizontalDifference = Math.abs(endCoords[0]-startCoords[0]);
		int verticalDifference = Math.abs(endCoords[1]-startCoords[1]);
		
		/*The number of moves will always be the larger value between the absolute value of the 
		 * horizizal difference and vertical difference because the king can move diagonally*/
		if(horizontalDifference > verticalDifference)
			numOfMoves = horizontalDifference;
		else
			numOfMoves = verticalDifference;
		System.out.println(numOfMoves);
		
		//The number of diagonal moves
		int diagonalMoves = Math.min(verticalDifference, horizontalDifference);
		
		//Down and left relative to the end coordinates
		if(startCoords[0] <= endCoords[0] && startCoords[1] <= endCoords[1]) {
			//The king moves as much diagonally as possible
			for(int x = 0; x < diagonalMoves; x++)
				System.out.println("RU");
			//The king moves in whatever direction it still needs to move in
			if(horizontalDifference > verticalDifference) {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("R");
			}
			else {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("U");
			}
		}
		
		//Up and left relative to the end coordinates
		else if(startCoords[0] <= endCoords[0] && startCoords[1] >= endCoords[1]) {
			for(int x = 0; x < diagonalMoves; x++)
				System.out.println("RD");
			if(horizontalDifference > verticalDifference) {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("R");
			}
			else {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("D");
			}
		}
		
		//Down and right relative to the end coordinates
		else if(startCoords[0] >= endCoords[0] && startCoords[1] <= endCoords[1]) {
			for(int x = 0; x < diagonalMoves; x++)
				System.out.println("LU");
			if(horizontalDifference > verticalDifference) {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("L");
			}
			else {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("U");
			}
		}
			
		//Up and right relative to the end coordinates
		else if(startCoords[0] >= endCoords[0] && startCoords[1] >= endCoords[1])	{
			for(int x = 0; x < diagonalMoves; x++)
				System.out.println("LD");
			if(horizontalDifference > verticalDifference) {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("L");
			}
			else {
				for(int x = 0; x < (numOfMoves-diagonalMoves); x++)
					System.out.println("D");
			}
		}
	}
}