#include <bits/stdc++.h>
int max(int a, int b) { return a > b ? a : b; }
int dist(int x, int y, int z, int z1) { return max(abs(x - y), abs(z - z1)); }
int main() {
  char a, b;
  int c, d;
  scanf("%c%d", &a, &c);
  getchar();
  scanf("%c%d", &b, &d);
  a -= 'a';
  b -= 'a';
  int res = dist(a, b, c, d);
  printf("%d\n", res);
  while (a != b || c != d) {
    if (a <= b && c >= d) {
      if (a != b && c != d) {
        a++;
        c--;
        printf("RD");
      } else if (a != b) {
        a++;
        printf("R");
      } else if (c != d) {
        printf("D");
        c--;
      }
    } else if (a <= b && c <= d) {
      if (a != b && c != d) {
        a++;
        c++;
        printf("RU");
      } else if (a != b) {
        a++;
        printf("R");
      } else if (c != d) {
        printf("U");
        c++;
      }
    } else if (a >= b && c >= d) {
      if (a != b && c != d) {
        a--;
        c--;
        printf("LD");
      } else if (a != b) {
        a--;
        printf("L");
      } else if (c != d) {
        printf("D");
        c--;
      }
    } else if (a >= b && c <= d) {
      if (a != b && c != d) {
        a--;
        c++;
        printf("LU");
      } else if (a != b) {
        a--;
        printf("L");
      } else if (c != d) {
        printf("D");
        c++;
      }
    }
    printf("\n");
  }
}
