#include <bits/stdc++.h>
using namespace std;
char s[2][3];
int sx, sy, ex, ey, re;
void solve() {
  scanf("%s %s", s[0], s[1]);
  sy = s[0][1] - '0';
  sx = s[0][0] - 'a';
  ey = s[1][1] - '0';
  ex = s[1][0] - 'a';
  re = min(abs(sx - ex), abs(sy - ey));
  printf("%d\n", re + abs(sx - ex) + abs(sy - ey) - 2 * re);
  for (int i = 0; i < re; i++) {
    if (sx < ex)
      printf("R");
    else
      printf("L");
    if (sy < ey)
      printf("U");
    else
      printf("D");
    puts("");
  }
  for (int i = 0; i < abs(sx - ex) - re; i++) {
    if (sx < ex)
      printf("R");
    else
      printf("L");
    puts("");
  }
  for (int i = 0; i < abs(sy - ey) - re; i++) {
    if (sy < ey)
      printf("U");
    else
      printf("D");
    puts("");
  }
}
int main(void) {
  solve();
  return 0;
}
