#include <bits/stdc++.h>
using namespace std;
int ab(int x) {
  if (x < 0) x = -x;
  return x;
}
int main() {
  string g, r;
  cin >> g >> r;
  int w = g[0] - 'a', x = g[1] - '1', y = r[0] - 'a', z = r[1] - '1';
  int Q = w - y;
  int W = x - z;
  cout << max(ab(Q), ab(W)) << endl;
  if (Q < 0) {
    if (W > 0)
      for (int i = 0; i < min(ab(Q), ab(W)); i++) cout << "RD" << endl;
    if (W < 0)
      for (int i = 0; i < min(ab(Q), ab(W)); i++) cout << "RU" << endl;
  }
  if (Q > 0) {
    if (W > 0)
      for (int i = 0; i < min(ab(Q), ab(W)); i++) cout << "LD" << endl;
    if (W < 0)
      for (int i = 0; i < min(ab(Q), ab(W)); i++) cout << "LU" << endl;
  }
  if (ab(Q) < ab(W)) {
    if (W < 0)
      for (int i = 0; i < ab(ab(Q) - ab(W)); i++) cout << "U" << endl;
    if (W > 0)
      for (int i = 0; i < ab(ab(Q) - ab(W)); i++) cout << "D" << endl;
  } else {
    if (Q < 0)
      for (int i = 0; i < ab(ab(Q) - ab(W)); i++) cout << "R" << endl;
    if (Q > 0)
      for (int i = 0; i < ab(ab(Q) - ab(W)); i++) cout << "L" << endl;
  }
}
