#include <bits/stdc++.h>
const long long INF = 1e18;
using namespace std;
void SOE(long long n) {
  bool isPrime[n + 1];
  memset(isPrime, true, sizeof(isPrime));
  for (long long p = 2; p <= n; p++) {
    if (isPrime[p]) {
      for (long long i = p * p; i <= n; i += p) isPrime[i] = false;
    }
  }
}
long long POWER(long long base, long long expo) {
  long long num = 1;
  long long i = expo;
  while (i) {
    num = num * base;
    i--;
  }
  return num;
}
int main() {
  long long t = 1;
  while (t--) {
    string s, t;
    cin >> s >> t;
    if (s[0] < t[0]) {
      long long r = t[0] - s[0];
      if (s[1] > t[1]) {
        long long d = s[1] - t[1];
        cout << max(d, r) << endl;
        long long x = min(d, r);
        for (long long i = 1; i <= x; i++) cout << "RD" << endl;
        r -= x;
        d -= x;
        for (long long i = 1; i <= r; i++) cout << "R" << endl;
        for (long long i = 1; i <= d; i++) cout << "D" << endl;
      } else {
        long long u = t[1] - s[1];
        cout << max(u, r) << endl;
        long long x = min(u, r);
        for (long long i = 1; i <= x; i++) cout << "RU" << endl;
        r -= x;
        u -= x;
        for (long long i = 1; i <= r; i++) cout << "R" << endl;
        for (long long i = 1; i <= u; i++) cout << "U" << endl;
      }
    } else {
      long long l = s[0] - t[0];
      if (s[1] > t[1]) {
        long long d = s[1] - t[1];
        cout << max(d, l) << endl;
        long long x = min(d, l);
        for (long long i = 1; i <= x; i++) cout << "LD" << endl;
        l -= x;
        d -= x;
        for (long long i = 1; i <= l; i++) cout << "L" << endl;
        for (long long i = 1; i <= d; i++) cout << "D" << endl;
      } else {
        long long u = t[1] - s[1];
        cout << max(u, l) << endl;
        long long x = min(u, l);
        for (long long i = 1; i <= x; i++) cout << "LU" << endl;
        l -= x;
        u -= x;
        for (long long i = 1; i <= l; i++) cout << "L" << endl;
        for (long long i = 1; i <= u; i++) cout << "U" << endl;
      }
    }
  }
  return 0;
}
