#include <bits/stdc++.h>
using namespace std;
int main() {
  char io[3], it[3];
  string h, v;
  int difo, dift, i;
  cin >> io;
  cin >> it;
  difo = (int)io[0] - (int)it[0];
  dift = io[1] - it[1];
  if (difo > 0)
    h = "L";
  else
    h = "R";
  if (dift > 0)
    v = "D";
  else
    v = "U";
  difo = abs(difo);
  dift = abs(dift);
  if (difo > dift) {
    cout << difo << endl;
    for (i = 0; i < dift; i++) cout << h << v << endl;
    while (i++ < difo) cout << h << endl;
  } else {
    cout << dift << endl;
    for (i = 0; i < difo; i++) cout << h + v << endl;
    while (i++ < dift) cout << v << endl;
  }
  return 0;
}
