#include <bits/stdc++.h>
using namespace std;
int main() {
  string n, m, f;
  int x1, x2, y1, y2, u = 0, d = 0, r = 0, l = 0, t;
  cin >> n >> m;
  x1 = n[0] - 96;
  y1 = n[1] - 48;
  x2 = m[0] - 96;
  y2 = m[1] - 48;
  t = x2 - x1;
  if (t > 0)
    r += t;
  else
    l += t * -1;
  t = y2 - y1;
  if (t > 0)
    u += t;
  else
    d += t * -1;
  cout << max(max(u, d), max(l, r)) << endl;
  while (d > 0 || u > 0 || r > 0 || l > 0) {
    if (r > 0) {
      cout << 'R';
      r--;
    }
    if (l > 0) {
      cout << 'L';
      l--;
    }
    if (u > 0) {
      cout << 'U';
      u--;
    }
    if (d > 0) {
      cout << 'D';
      d--;
    }
    cout << endl;
  }
  return 0;
}
