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