#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long exp, long long mod = (1000000007LL)) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2) {
      res = (res * base) % mod;
    }
    base = (base * base) % mod;
    exp /= 2;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    gcd(b, a % b);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
inline string rs() {
  char x[1234567];
  scanf("%s", x);
  string s = x;
  return s;
}
inline long long int ri() {
  long long int x;
  scanf("%d", &x);
  return x;
}
inline long long rl() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const long long int N = 1234567;
string s, t;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s >> t;
  cout << max(abs(t[0] - s[0]), abs(t[1] - s[1])) << '\n';
  while (s.compare(t) != 0) {
    if (s[0] < t[0]) {
      cout << "R";
      s[0]++;
    } else if (s[0] > t[0]) {
      cout << "L";
      s[0]--;
    }
    if (s[1] < t[1]) {
      cout << "U";
      s[1]++;
    } else if (s[1] > t[1]) {
      cout << "D";
      s[1]--;
    }
    cout << '\n';
  }
  return 0;
}
