#include <bits/stdc++.h>
using namespace std;
const int inf = 10000000;
const int MAX_V = 10000000;
int d[MAX_V + 5];
int res1, res2;
struct nodo {
  int x, y;
  vector<string> ct;
  nodo(int a, int b) { x = a, y = b; }
};
int a[8] = {1, 1, 0, -1, -1, -1, 0, 1}, b[8] = {0, 1, 1, 1, 0, -1, -1, -1};
bool visit[9][9];
void bfs(int s1, int s2) {
  deque<nodo> Q;
  nodo k(s1, s2);
  Q.push_back(k);
  while (!Q.empty()) {
    nodo u = Q.front();
    Q.pop_front();
    if (u.x == res1 && u.y == res2) {
      cout << u.ct.size() << endl;
      for (int i = 0; i < u.ct.size(); i++) cout << u.ct[i] << endl;
      return;
    }
    if (visit[u.x][u.y]) continue;
    visit[u.x][u.y] = 1;
    for (int i = 0; i < 8; i++) {
      if (u.x + b[i] > 0 && u.x + b[i] < 9 && u.y + a[i] < 9 &&
          u.y + a[i] > 0) {
        nodo uu(u.x + b[i], u.y + a[i]);
        uu.ct = u.ct;
        switch (i) {
          case 0:
            uu.ct.push_back("U");
            break;
          case 1:
            uu.ct.push_back("RU");
            break;
          case 2:
            uu.ct.push_back("R");
            break;
          case 3:
            uu.ct.push_back("RD");
            break;
          case 4:
            uu.ct.push_back("D");
            break;
          case 5:
            uu.ct.push_back("LD");
            break;
          case 6:
            uu.ct.push_back("L");
            break;
          case 7:
            uu.ct.push_back("LU");
            break;
        }
        Q.push_back(uu);
      }
    }
  }
}
int main() {
  string ss1, ss2;
  cin >> ss1 >> ss2;
  memset(visit, 0, sizeof(visit));
  int d2 = ss1[1] - '0', d1 = ss1[0] - 'a';
  d1++;
  res2 = ss2[1] - '0', res1 = ss2[0] - 'a';
  res1++;
  bfs(d1, d2);
  return 0;
}
