#include <bits/stdc++.h>
int abs(int x) {
  if (x < 0)
    return -x;
  else
    return x;
}
int m(int x, int y) {
  if (x > y)
    return y;
  else
    return x;
}
int main() {
  char s[4], t[4];
  scanf("%s", s);
  scanf("%s", t);
  int x1, y1, x2, y2;
  x1 = s[0] - 'a' + 1;
  x2 = t[0] - 'a' + 1;
  y1 = s[1] - '0';
  y2 = t[1] - '0';
  char c1, c2, c3;
  int mov = 0, x = 0;
  if (x1 != x2 && y1 != y2) {
    mov = m(abs(x1 - x2), abs(y1 - y2));
    if (x1 < x2) {
      c1 = 'R';
      x1 += mov;
    } else {
      c1 = 'L';
      x1 -= mov;
    }
    if (y1 < y2) {
      c2 = 'U';
      y1 += mov;
    } else {
      c2 = 'D';
      y1 -= mov;
    }
  }
  x = mov;
  if (x1 != x2 && y1 == y2) {
    if (x1 < x2)
      c3 = 'R';
    else
      c3 = 'L';
    mov += abs(x1 - x2);
  } else if (x1 == x2 && y1 != y2) {
    if (y1 < y2)
      c3 = 'U';
    else
      c3 = 'D';
    mov += abs(y1 - y2);
  }
  printf("%d\n", mov);
  if (x != 0) {
    for (int i = 0; i < x; i++) {
      printf("%c%c\n", c1, c2);
    }
  }
  for (int i = 0; i < mov - x; i++) {
    printf("%c\n", c3);
  }
}
