#include <bits/stdc++.h>
int main() {
  char s0[3], s1[3], xc, yc;
  int dx, dy;
  gets(s0);
  gets(s1);
  dx = s1[0] - s0[0];
  dy = s1[1] - s0[1];
  if (dx < 0) {
    dx = -dx;
    xc = 'L';
  } else
    xc = 'R';
  if (dy < 0) {
    dy = -dy;
    yc = 'D';
  } else
    yc = 'U';
  for (printf("%d\n", dx > dy ? dx : dy); dx || dy; printf("\n")) {
    if (dx) {
      putchar(xc);
      dx--;
    }
    if (dy) {
      putchar(yc);
      dy--;
    }
  }
  return 0;
}
