#include <bits/stdc++.h>
using namespace std;
vector<string> v;
int main() {
  string a, b;
  cin >> a >> b;
  int x1 = a[0] - 'a';
  int y1 = a[1] - '0';
  int x2 = b[0] - 'a';
  int y2 = b[1] - '0';
  int ans = 0;
  if (x1 <= x2) {
    if (y1 <= y2) {
      while (x1 < x2 && y1 < y2) {
        v.push_back("RU");
        x1++;
        y1++;
        ans++;
      }
      while (x1 < x2) {
        v.push_back("R");
        x1++;
        ans++;
      }
      while (y1 < y2) {
        v.push_back("U");
        y1++;
        ans++;
      }
    } else {
      while (x1 < x2 && y1 > y2) {
        v.push_back("RD");
        x1++;
        y1--;
        ans++;
      }
      while (x1 < x2) {
        v.push_back("R");
        x1++;
        ans++;
      }
      while (y1 > y2) {
        v.push_back("D");
        y1--;
        ans++;
      }
    }
  } else {
    if (y1 <= y2) {
      while (x1 > x2 && y1 < y2) {
        v.push_back("LU");
        x1--;
        ans++;
        y1++;
      }
      while (x1 > x2) {
        v.push_back("L");
        x1--;
        ans++;
      }
      while (y1 < y2) {
        v.push_back("U");
        y1++;
        ans++;
      }
    } else {
      while (x1 > x2 && y1 > y2) {
        v.push_back("LD");
        x1--;
        ans++;
        y1--;
      }
      while (x1 > x2) {
        v.push_back("L");
        x1--;
        ans++;
      }
      while (y1 > y2) {
        v.push_back("D");
        y1--;
        ans++;
      }
    }
  }
  cout << ans << endl;
  for (int i = 0; i < ans; i++) cout << v[i] << endl;
  return 0;
}
