#include <bits/stdc++.h>
using namespace std;
string x, y, z;
int n;
string chk() {
  if (x[0] == y[0]) {
    if (x[1] == y[1]) {
    } else if (x[1] < y[1]) {
      n = x[1] + 1;
      x[1] = n;
      return "U";
    } else if (x[1] > y[1]) {
      n = x[1] - 1;
      x[1] = n;
      return "D";
    }
  } else if (x[0] > y[0]) {
    if (x[1] == y[1]) {
      n = x[0] - 1;
      x[0] = n;
      return "L";
    } else if (x[1] < y[1]) {
      n = x[0] - 1;
      x[0] = n;
      n = x[1] + 1;
      x[1] = n;
      return "LU";
    } else if (x[1] > y[1]) {
      n = x[0] - 1;
      x[0] = n;
      n = x[1] - 1;
      x[1] = n;
      return "LD";
    }
  } else if (x[0] < y[0]) {
    if (x[1] == y[1]) {
      n = x[0] + 1;
      x[0] = n;
      return "R";
    } else if (x[1] < y[1]) {
      n = x[0] + 1;
      x[0] = n;
      n = x[1] + 1;
      x[1] = n;
      return "RU";
    } else if (x[1] > y[1]) {
      n = x[0] + 1;
      x[0] = n;
      n = x[1] - 1;
      x[1] = n;
      return "RD";
    }
  }
}
int main() {
  cin >> x >> y;
  string arr[15];
  int cnt = 0;
  while (x != y) {
    z = chk();
    arr[cnt++] = z;
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) cout << arr[i] << endl;
  return 0;
}
