#include <bits/stdc++.h>
int main() {
  char w1[100];
  char w2[100];
  gets(w1);
  scanf(" ");
  gets(w2);
  int a[2][2];
  a[0][0] = w1[0] - 'a';
  a[0][1] = w1[1] - '0';
  a[1][0] = w2[0] - 'a';
  a[1][1] = w2[1] - '0';
  int ans[1000] = {0};
  int point = 0;
  while (a[0][0] != a[1][0] || a[0][1] != a[1][1]) {
    if (a[0][0] > a[1][0]) {
      if (a[0][1] > a[1][1]) {
        a[0][0]--;
        a[0][1]--;
        ans[point++] = 1;
      } else if (a[0][1] < a[1][1]) {
        a[0][0]--;
        a[0][1]++;
        ans[point++] = 2;
      } else {
        a[0][0]--;
        ans[point++] = 3;
      }
    } else if (a[0][0] < a[1][0]) {
      if (a[0][1] > a[1][1]) {
        a[0][0]++;
        a[0][1]--;
        ans[point++] = 4;
      } else if (a[0][1] < a[1][1]) {
        a[0][0]++;
        a[0][1]++;
        ans[point++] = 5;
      } else {
        a[0][0]++;
        ans[point++] = 6;
      }
    } else {
      if (a[0][1] > a[1][1]) {
        a[0][1]--;
        ans[point++] = 7;
      } else if (a[0][1] < a[1][1]) {
        a[0][1]++;
        ans[point++] = 8;
      } else {
      }
    }
  }
  printf("%d\n", point);
  int i;
  for (i = 0; i < point; i++) {
    if (ans[i] == 1)
      printf("LD\n");
    else if (ans[i] == 2)
      printf("LU\n");
    else if (ans[i] == 3)
      printf("L\n");
    else if (ans[i] == 5)
      printf("RU\n");
    else if (ans[i] == 4)
      printf("RD\n");
    else if (ans[i] == 6)
      printf("R\n");
    else if (ans[i] == 7)
      printf("D\n");
    else if (ans[i] == 8)
      printf("U\n");
  }
}
