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.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int row = 8;
		int col = 8;
		List<List<Integer>> adjList = makeAdjList(row, col);
		
		
		int[] distance = new int[row * col + 1];
		boolean[] visited = new boolean[row * col + 1];
		LinkedList<Integer> queue = new LinkedList<>();
		
		String input1 = sc.next();
		String input2 = sc.next();
		char first1 = input1.charAt(0);
		int first2 = Integer.parseInt(input1.substring(1));
		//System.out.println(first1 + " " + first2);
		
		char first3 = input2.charAt(0);
		int first4 = Integer.parseInt(input2.substring(1));
		//System.out.println(first3 + " " + first4);
		int k = 0,l = 0;
		switch(first1){
		case 'a':
			k = 1;
			break;
		case 'b':
			k = 2;
			break;
		case 'c':
			k = 3;
			break;
		case 'd':
			k = 4;
			break;
		case 'e':
			k = 5;
			break;
		case 'f':
			k = 6;
			break;
		case 'g':
			k = 7;
			break;
		case 'h':
			k = 8;
			break;
		}
		switch(first3){
		case 'a':
			l = 1;
			break;
		case 'b':
			l = 2;
			break;
		case 'c':
			l = 3;
			break;
		case 'd':
			l = 4;
			break;
		case 'e':
			l = 5;
			break;
		case 'f':
			l = 6;
			break;
		case 'g':
			l = 7;
			break;
		case 'h':
			l = 8;
			break;
		}
		
		
		int start = k + ((8 - first2) * row);
		int end = l + ((8 - first4) * row);
		//System.out.println(start + " " + end);
		//sc.next();
		queue.add(start);
		visited[start] = true;
		distance[start] = 0;
		int visit[] = new int[row * col + 1];
		visit[start] = 0;
		while(!queue.isEmpty()){
			int val = queue.remove();
			if(val == end){
				break;
			}
			
			Iterator<Integer> it = adjList.get(val).listIterator();
			while(it.hasNext()){
				int next = it.next();
				if(!visited[next]){
					queue.add(next);
					visited[next] = true;
					distance[next] = distance[val] + 1;
					visit[next] = val;
				}
			}
		}
		int ans = distance[end];
		System.out.println(ans);
		
		int iIndex = l;
		int jIndex = 9 - first4;
		//System.out.println(iIndex + " " + jIndex);
		String[] arr = new String[ans];
		int in = 0;
		while(visit[end] != 0){
		
			//System.out.print(end + " ");
			int temp = visit[end];
			
			int x1 = temp -1;
			int x2 = temp + 1;
			int x3 = temp - row;
			int x4 = temp + row;
			int x5 = x4 - 1;
			int x6 = x4 + 1;
			int x7 = x3 - 1;
			int x8 = x3 + 1;
			
//			if(iIndex > 1 && jIndex > 1 && iIndex < 8 && jIndex < 8){
//			    	
//			}
//			else{
//				if(iIndex == 1){
//					x1 = x5 = x7 = -1;
//				}
//				if(jIndex == 1){
//					x7 = x3 = x8 = -1;
//				}
//				if(iIndex == 8){
//					x8 = x2 = x6 = -1;
//				}
//				if(jIndex == 8){
//					x5 = x4 = x6 = -1;
//				}
//			}
			
			if(x1 != -1 && x1 == end){
				//System.out.print('L');
				arr[in++] = "L";
			}
			else if(x2 != -1 && x2 == end){
				//System.out.print('R');
				arr[in++] = "R";
			}
			else if(x3 != -1 && x3 == end){
				//System.out.print('U');
				arr[in++] = "U";
			}
			else if(x4 != -1 && x4 == end){
				//System.out.print('D');
				arr[in++] = "D";
			}
			else if(x5 != -1 && x5 == end){
				//System.out.print("LD");
				arr[in++] = "LD";
			}
			else if(x6 != -1 && x6 == end){
				//System.out.print("RD");
				arr[in++] = "RD";
			}
			else if(x7 != -1 && x7 == end){
				//System.out.print("LU");
				arr[in++] = "LU";
			}
			else if(x8 != -1 && x8 == end){
				//System.out.print("RU");
				arr[in++] = "RU";
			}
			else{
				arr[in++] = "BAL";
			}
			
			//System.out.println();
			end = temp;
		}
		//System.out.println();
		for(int i = ans-1; i>=0; i--){
			System.out.println(arr[i]);
		}
		

	}

	private static List<List<Integer>> makeAdjList(int row, int col) {
		List<List<Integer>> adjList = new ArrayList<>();
		for (int i = 1; i <= row * col + 2; i++) {
			adjList.add(new ArrayList<>());
		}

		for (int i = 1; i <= row; i++) {
			for (int j = 1; j <= col; j++) {

				int x1 = i - 1;
				int y1 = j - 1;
				int x2 = i;
				int y2 = j - 1;
				int x3 = i + 1;
				int y3 = j - 1;
				int x4 = i + 1;
				int y4 = j;
				int x5 = i + 1;
				int y5 = j + 1;
				int x6 = i;
				int y6 = j + 1;
				int x7 = i - 1;
				int y7 = j + 1;
				int x8 = i - 1;
				int y8 = j;

				if (x1 > 0 && y1 > 0 && x1 <= row && y1 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x1 - 1) * row) + y1);
					
				}
				if (x2 > 0 && y2 > 0 && x2 <= row && y2 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x2 - 1) * row) + y2);
				}
				if (x3 > 0 && y3 > 0 && x3 <= row && y3 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x3 - 1) * row) + y3);
				}
				if (x4 > 0 && y4 > 0 && x4 <= row && y4 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x4 - 1) * row) + y4);
				}
				if (x5 > 0 && y5 > 0 && x5 <= row && y5 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x5 - 1) * row) + y5);
				}
				if (x6 > 0 && y6 > 0 && x6 <= row && y6 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x6 - 1) * row) + y6);
				}
				if (x7 > 0 && y7 > 0 && x7 <= row && y7 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x7 - 1) * row) + y7);
				}
				if (x8 > 0 && y8 > 0 && x8 <= row && y8 <= col) {

					adjList.get( (i - 1) * row + j ).add(((x8 - 1) * row) + y8);
				}

			}
		}
		
//		for(int i = 63; i <= 64; i++){
//			Iterator<Integer> it = adjList.get(i).listIterator();
//			System.out.print(i + "-> ");
//			while(it.hasNext()){
//				System.out.print(it.next() + " ");
//			}
//			System.out.println();
//		}

		return adjList;
	}

}