#include <bits/stdc++.h>
using namespace std;
int main() {
  char c;
  long y1, y2, x1, x2;
  cin >> c >> y1;
  x1 = c - 'a' + 1;
  cin >> c >> y2;
  x2 = c - 'a' + 1;
  printf("%ld\n", max(abs(x2 - x1), abs(y2 - y1)));
  while (abs(x2 - x1) > abs(y2 - y1)) {
    if (x1 < x2) {
      printf("R\n");
      x1++;
    } else {
      printf("L\n");
      x1--;
    };
  }
  while (abs(x2 - x1) < abs(y2 - y1)) {
    if (y1 < y2) {
      printf("U\n");
      y1++;
    } else {
      printf("D\n");
      y1--;
    };
  }
  for (long k = 1; k <= abs(x2 - x1); k++) {
    if (x1 < x2) {
      printf("R");
    } else {
      printf("L");
    };
    if (y1 < y2) {
      printf("U\n");
    } else {
      printf("D\n");
    };
  }
}
