#include <bits/stdc++.h>
int main() {
  int sx, sy, dx, dy, tx, ty, cx, cy, count;
  char in[3];
  scanf("%s", in);
  sx = in[0] - 'a' + 1;
  sy = in[1] - '1' + 1;
  scanf("%s", in);
  dx = in[0] - 'a' + 1;
  dy = in[1] - '1' + 1;
  tx = dx - sx;
  ty = dy - sy;
  cx = tx;
  cy = ty;
  if (cx < 0) cx = -cx;
  if (cy < 0) cy = -cy;
  count = cx;
  if (count > cy) count = cy;
  count = cx + cy - count;
  printf("%d\n", count);
  while (tx || ty) {
    if (tx > 0 && ty > 0) {
      printf("RU\n");
      tx--;
      ty--;
    } else if (tx < 0 && ty > 0) {
      printf("LU\n");
      tx++;
      ty--;
    } else if (tx < 0 && ty < 0) {
      printf("LD\n");
      tx++;
      ty++;
    } else if (tx > 0 && ty < 0) {
      printf("RD\n");
      tx--;
      ty++;
    } else if (tx > 0) {
      printf("R\n");
      tx--;
    } else if (tx < 0) {
      printf("L\n");
      tx++;
    } else if (ty > 0) {
      printf("U\n");
      ty--;
    } else if (ty < 0) {
      printf("D\n");
      ty++;
    }
  }
  return 0;
}
