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.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.InputMismatchException;

public class long4 {
	public static int count1 = 1;

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		
		StringBuilder s = new StringBuilder("");
		String s1 = in.readString();
		String s2 = in.readString();
		int count = 0;
		if (s1.charAt(0) < s2.charAt(0)) {
			int val1 = s2.charAt(0) - s1.charAt(0);
			// right++;
			if (s1.charAt(1) < s2.charAt(1)) {
				int val = s2.charAt(1) - s1.charAt(1);
				// up++;
				int x = Math.min(val1, val);

				while (x > 0) {
					s.append("RU\n");
					x--;
					count++;
					val1--;
					val--;
				}
				while (val1 > 0) {
					
					s.append("R\n");
					count++;
					val1--;
				}
				while (val > 0) {
					s.append("U\n");
					count++;
					val--;
				}

			} else {
				int val = s1.charAt(1) - s2.charAt(1);
				// down++;

				int x = Math.min(val1, val);

				while (x > 0) {
					s.append("RD\n");
					x--;
					count++;
					val1--;
					val--;
				}
				while (val1 > 0) {
					s.append("R\n");
					count++;
					val1--;
				}
				while (val > 0) {
					s.append("D\n");
					count++;
					val--;
				}

			}
		}
		
		else {
			int val1 = s1.charAt(0) - s2.charAt(0);
			// left++;
			if (s1.charAt(1) < s2.charAt(1)) {
				int val = s2.charAt(1) - s1.charAt(1);
				// up++;
				int x = Math.min(val1, val);

				while (x > 0) {
					s.append("LU\n");
					x--;
					count++;
					val1--;
					val--;
				}
				while (val1 > 0) {
					s.append("L\n");
					count++;
					val1--;
				}
				while (val > 0) {
					s.append("U\n");
					count++;
					val--;
				}

			} else {
				int val = s1.charAt(1) - s2.charAt(1);
				// down++;

				int x = Math.min(val1, val);

				while (x > 0) {
					s.append("LD\n");
					x--;
					count++;
					val1--;
					val--;
				}
				while (val1 > 0) {
					s.append("L\n");
					count++;
					val1--;
				}
				while (val > 0) {
					s.append("D\n");
					count++;
					val--;
				}

			}
		}
System.out.println(count);
if (count!=0)
System.out.print(s.toString());

		// int t = in.readInt();
		//
		// for (int i = 0; i < t; i++) {
		//
		// int N = in.readInt();
		// int M = in.readInt();
		//
		// long[] arr = new long[N];
		//
		// for (int j = 0; j < arr.length; j++) {
		//
		// arr[j] = in.readInt();
		//
		// }
		// int x = (int) Math.pow(2, (int) Math.ceil(Math.log(arr.length) /
		// Math.log(2)) + 1) - 1;
		// long seg2[] = new long[x];
		// long lazy2[] = new long[x];
		// long lazy5[] = new long[x];
		// long seg5[] = new long[x];
		//
		// segment2(0, arr.length - 1, seg2, arr, 0);
		// segment5(0, arr.length - 1, seg5, arr, 0);
		//
		// long total = 0;
		//
		// for (int h = 0; h < M; h++) {
		//
		// int query = in.readInt();
		// int l = in.readInt() - 1;
		// int r = in.readInt() - 1;
		// if (query == 1) {
		// int X = in.readInt();
		// int val = X;
		// int c = 0;
		// while (val % 2 == 0) {
		// c++;
		// val = val / 2;
		// }
		// up12(lazy2, c, l, r, 0, arr.length - 1, seg2, arr, 0);
		// c = 0;
		// while (val % 5 == 0) {
		// c++;
		// val = val / 5;
		// }
		//
		// up15(lazy5, c, l, r, 0, arr.length - 1, seg5, arr, 0);
		//
		// } else if (query == 2) {
		//
		// int Y = in.readInt();
		// up22(Y, l, r, 0, arr.length - 1, seg2, arr, 0);
		// count1 = 1;
		// up25(Y, l, r, 0, arr.length - 1, seg5, arr, 0);
		// count1 = 1;
		//
		// } else {
		// long v2 = query2(l, r, 0, arr.length - 1, seg2, arr, 0);
		// long v5 = query5(l, r, 0, arr.length - 1, seg5, arr, 0);
		// total = total + (int) Math.min(v2, v5);
		// }
		//
		// }
		// out.printLine(total);
		// }

		out.close();
	}

	public static void segment2(int low, int high, long seg[], long[] ori, int pos) {

		if (high < low) {
			return;
		}
		if (low == high) {
			int count = 0;
			long x = ori[low];
			while (x % 2 == 0) {
				x = x / 2;
				count++;
			}
			seg[pos] = count;
			return;
		}

		int mid = (low + high) / 2;

		segment2(low, mid, seg, ori, 2 * pos + 1);

		segment2(mid + 1, high, seg, ori, 2 * pos + 2);

		seg[pos] = seg[pos * 2 + 1] + seg[pos * 2 + 2];
	}

	public static void segment5(int low, int high, long seg[], long[] ori, int pos) {

		if (high < low) {
			return;
		}
		if (low == high) {
			int count = 0;
			long x = ori[low];
			while (x % 5 == 0) {
				x = x / 5;
				count++;
			}
			seg[pos] = count;
			return;
		}

		int mid = (low + high) / 2;

		segment5(low, mid, seg, ori, 2 * pos + 1);

		segment5(mid + 1, high, seg, ori, 2 * pos + 2);

		seg[pos] = seg[pos * 2 + 1] + seg[pos * 2 + 2];
	}

	public static void up12(long[] lazy, int mult, int qlow, int qhigh, int low, int high, long seg[], long[] ori,
			int pos) {

		if (qlow > high || qhigh < low) {
			return;
		}

		if (lazy[pos] != 0) {

			seg[pos] = seg[pos] + lazy[pos];
			if (low != high) {
				lazy[2 * pos + 1] += lazy[pos];
				lazy[2 * pos + 2] += lazy[pos];
			}
			lazy[pos] = 0;

		}

		if (qlow <= low && qhigh >= high) {
			seg[pos] = seg[pos] + mult;
			if (low != high) {
				lazy[2 * pos + 1] += mult;
				lazy[2 * pos + 2] += mult;
			}

			return;
		}

		int mid = (low + high) / 2;
		up12(lazy, mult, qlow, qhigh, low, mid, seg, ori, pos * 2 + 1);
		up12(lazy, mult, qlow, qhigh, mid + 1, high, seg, ori, pos * 2 + 2);
		seg[pos] = seg[2 * pos + 1] + seg[2 * pos + 2];
		return;

	}

	public static void up15(long lazy[], int mult, int qlow, int qhigh, int low, int high, long seg[], long[] ori,
			int pos) {

		if (qlow > high || qhigh < low) {
			return;
		}

		if (lazy[pos] != 0) {

			seg[pos] = seg[pos] + lazy[pos];
			if (low != high) {
				lazy[2 * pos + 1] += lazy[pos];
				lazy[2 * pos + 2] += lazy[pos];
			}
			lazy[pos] = 0;

		}
		if (qlow <= low && qhigh >= high) {
			seg[pos] = seg[pos] + mult;
			if (low != high) {
				lazy[2 * pos + 1] += mult;
				lazy[2 * pos + 2] += mult;
			}

			return;
		}
		int mid = (low + high) / 2;
		up15(lazy, mult, qlow, qhigh, low, mid, seg, ori, pos * 2 + 1);
		up15(lazy, mult, qlow, qhigh, mid + 1, high, seg, ori, pos * 2 + 2);
		seg[pos] = seg[2 * pos + 1] + seg[2 * pos + 2];
		return;

	}

	public static void up22(int mult, int qlow, int qhigh, int low, int high, long seg[], long[] ori, int pos) {

		if (qlow > high || qhigh < low) {
			return;
		}

		if (low == high) {
			seg[pos] = 0;
			int z = 0;
			while (mult % 2 == 0) {
				mult = mult / 2;
				z++;
			}
			long za = count1;
			int val = 0;
			while (za % 2 == 0) {
				za /= 2;
				val++;
			}
			long c = val + z;

			seg[pos] = seg[pos] + c;
			count1++;

			return;
		}
		int mid = (low + high) / 2;
		up22(mult, qlow, qhigh, low, mid, seg, ori, pos * 2 + 1);
		up22(mult, qlow, qhigh, mid + 1, high, seg, ori, pos * 2 + 2);
		seg[pos] = seg[2 * pos + 1] + seg[2 * pos + 2];

		return;

	}

	public static void up25(int mult, int qlow, int qhigh, int low, int high, long seg[], long[] ori, int pos) {

		if (qlow > high || qhigh < low) {
			return;
		}

		if (low == high) {
			seg[pos] = 0;
			int z = 0;
			while (mult % 5 == 0) {
				mult = mult / 5;
				z++;
			}
			long za = count1;
			int val = 0;
			while (za % 5 == 0) {
				za /= 5;
				val++;
			}
			long c = val + z;

			seg[pos] = seg[pos] + c;
			count1++;
			return;
		}
		int mid = (low + high) / 2;
		up25(mult, qlow, qhigh, low, mid, seg, ori, pos * 2 + 1);
		up25(mult, qlow, qhigh, mid + 1, high, seg, ori, pos * 2 + 2);
		seg[pos] = seg[2 * pos + 1] + seg[2 * pos + 2];
		return;
	}

	public static long query2(int qlow, int qhigh, int low, int high, long seg[], long[] ori, int pos) {

		if (qlow > high || qhigh < low) {
			return 0;
		}
		if (qlow <= low && qhigh >= high) {
			return seg[pos];

		}

		int mid = (low + high) / 2;

		return query2(qlow, qhigh, low, mid, seg, ori, pos * 2 + 1)
				+ query2(qlow, qhigh, mid + 1, high, seg, ori, pos * 2 + 2);
	}

	public static long query5(int qlow, int qhigh, int low, int high, long seg[], long[] ori, int pos) {

		if (qlow > high || qhigh < low) {
			return 0;
		}
		if (qlow <= low && qhigh >= high) {
			return seg[pos];

		}

		int mid = (low + high) / 2;

		return query5(qlow, qhigh, low, mid, seg, ori, pos * 2 + 1)
				+ query5(qlow, qhigh, mid + 1, high, seg, ori, pos * 2 + 2);
	}

	private static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			long sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuffer res = new StringBuffer();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		static boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return readString();
		}
	}

	private static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(outputStream);
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}
	}
}