#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000;
int maze[9][9];
int d[9][9];
int sx, sy;
int gx, gy;
int dx, dy;
int maxn = -99999;
void bfs() {
  for (int i = 1; i < 9; i++)
    for (int j = 1; j < 9; j++) d[i][j] = INF;
  queue<pair<int, int> > que;
  que.push(pair<int, int>(sx, sy));
  d[sx][sy] = 0;
  while (que.size()) {
    pair<int, int> p = que.front();
    que.pop();
    if (p.first == gx && p.second == gy) break;
    for (dx = -1; dx <= 1; dx++)
      for (dy = -1; dy <= 1; dy++) {
        int nx = p.first + dx, ny = p.second + dy;
        if (1 <= nx && nx <= 8 && 1 <= ny && ny <= 8 && d[nx][ny] == INF) {
          que.push(pair<int, int>(nx, ny));
          d[nx][ny] = d[p.first][p.second] + 1;
        }
      }
  }
}
int main() {
  int x, y;
  char a1, b1, a2, b2;
  vector<pair<int, int> > ans;
  cin >> a1 >> b1 >> a2 >> b2;
  sy = a1 - 'a' + 1, sx = 9 - (b1 - '0'), gy = a2 - 'a' + 1,
  gx = 9 - (b2 - '0');
  if (sx == gx && sy == gy)
    cout << "0" << endl;
  else {
    bfs();
    x = gx, y = gy;
    while (1) {
      if (d[x][y] == 0) break;
      for (dx = -1; dx <= 1; dx++)
        for (dy = -1; dy <= 1; dy++) {
          if (x + dx <= 8 && x + dx >= 1 && y + dy <= 8 && y + dy >= 1 &&
              d[x + dx][y + dy] == d[x][y] - 1) {
            x = x + dx, y = y + dy;
            ans.push_back(pair<int, int>(-dx, -dy));
          }
        }
    }
    cout << ans.size() << endl;
    for (int i = ans.size(); i >= 0; i--) {
      if (ans[i] == pair<int, int>(0, 1)) cout << "R" << endl;
      if (ans[i] == pair<int, int>(1, 1)) cout << "RD" << endl;
      if (ans[i] == pair<int, int>(-1, 1)) cout << "RU" << endl;
      if (ans[i] == pair<int, int>(1, 0)) cout << "D" << endl;
      if (ans[i] == pair<int, int>(-1, 0)) cout << "U" << endl;
      if (ans[i] == pair<int, int>(0, -1)) cout << "L" << endl;
      if (ans[i] == pair<int, int>(1, -1)) cout << "LD" << endl;
      if (ans[i] == pair<int, int>(-1, -1)) cout << "LU" << endl;
    }
  }
  return 0;
}
