#include <bits/stdc++.h>
using namespace std;
string begg, endd;
map<string, string> nodetoparent, parent;
int stopper, yb, xb, ye, xe, ans, depth;
int xlist[] = {0, 0, 1, 1, 1, -1, -1, -1},
    ylist[] = {1, -1, 0, 1, -1, 0, 1, -1};
string temp;
void BFS(string bg, string ed) {
  queue<string> frontier;
  frontier.push(bg);
  nodetoparent[bg] = "non";
  while (!frontier.empty()) {
    int sz = frontier.size();
    for (int i = 0; i < sz; i++, frontier.pop()) {
      if (frontier.front() == ed) {
        return;
      }
      for (int j = 0; j < 8; j++) {
        if (xlist[j] == 1) {
          if (frontier.front()[0] == 'h') {
            continue;
          }
        }
        if (xlist[j] == -1) {
          if (frontier.front()[0] == 'a') {
            continue;
          }
        }
        if (ylist[j] == 1) {
          if (frontier.front()[1] == '8') {
            continue;
          }
        }
        if (ylist[j] == -1) {
          if (frontier.front()[1] == '1') {
            continue;
          }
        }
        char a = frontier.front()[0] + xlist[j];
        char b = frontier.front()[1] + ylist[j];
        string ns;
        ns += a;
        ns += b;
        if (nodetoparent[ns] == "") {
          string dir;
          if (xlist[j] == 1) {
            dir += 'R';
          }
          if (xlist[j] == -1) {
            dir += 'L';
          }
          if (ylist[j] == 1) {
            dir += 'U';
          }
          if (ylist[j] == -1) {
            dir += 'D';
          }
          nodetoparent[ns] = dir;
          parent[ns] = frontier.front();
          frontier.push(ns);
        }
      }
    }
    depth++;
  }
}
int main() {
  cin >> begg >> endd;
  BFS(begg, endd);
  cout << depth << endl;
  while (depth--) {
    cout << nodetoparent[endd] << endl;
    endd = parent[endd];
  }
  cin >> stopper;
  return 0;
}
