#include <bits/stdc++.h>
using namespace std;
int main() {
  string start, end;
  cin >> start >> end;
  int sc = start[0] - 'a' + 1;
  int sr = start[1] - '0';
  int ec = end[0] - 'a' + 1;
  int er = end[1] - '0';
  vector<string> v;
  while (true) {
    if (sc == ec and sr == er) break;
    if (sc < ec and sr < er)
      sc++, sr++, v.push_back("RU");
    else if (sc < ec and sr > er)
      sc++, sr--, v.push_back("RD");
    else if (sc > ec and sr < er)
      sc--, sr++, v.push_back("LU");
    else if (sc > ec and sr > er)
      sc--, sr--, v.push_back("LD");
    else if (sc < ec)
      sc++, v.push_back("R");
    else if (sc > ec)
      sc--, v.push_back("L");
    else if (sr < er)
      sr++, v.push_back("U");
    else
      sr--, v.push_back("D");
  }
  cout << v.size() << '\n';
  for (string i : v) cout << i << '\n';
  return 0;
}
