#include <bits/stdc++.h>
using namespace std;
int main() {
  char a, b, c, d;
  cin >> a >> b >> c >> d;
  int ans = max(abs(a - c), abs(b - d));
  cout << ans << endl;
  for (;;) {
    if (a == c and b == d) break;
    if (a > c) {
      cout << "L";
      a--;
    }
    if (c > a) {
      cout << "R";
      a++;
    }
    if (b > d) {
      cout << "D";
      b--;
    }
    if (b < d) {
      cout << "U";
      b++;
    }
    cout << endl;
  }
  return 0;
}
