#include <bits/stdc++.h>
int main() {
  char Hscale, Hvalue, PHscale, PHvalue;
  char Vscale, Vvalue, PVscale, PVvalue;
  scanf("%c", &Vscale);
  scanf("%c\n", &Hscale);
  scanf("%c", &PVscale);
  scanf("%c", &PHscale);
  Hscale -= 48;
  PHscale -= 48;
  Vvalue = Vscale - 97;
  Hvalue = 8 - Hscale;
  PVvalue = PVscale - 97;
  PHvalue = 8 - PHscale;
  int tHvalue = Hvalue;
  int tVvalue = Vvalue;
  int lowestMove = 0;
  while (!((tHvalue == PHvalue) && (tVvalue == PVvalue))) {
    if (PHvalue - tHvalue > 0)
      tHvalue++;
    else if (PHvalue - tHvalue < 0)
      tHvalue--;
    if (PVvalue - tVvalue > 0)
      tVvalue++;
    else if (PVvalue - tVvalue < 0)
      tVvalue--;
    lowestMove++;
  }
  printf("%d\n", lowestMove);
  tHvalue = Hvalue;
  tVvalue = Vvalue;
  while (!((tHvalue == PHvalue) && (tVvalue == PVvalue))) {
    if (PVvalue - tVvalue > 0) {
      tVvalue++;
      printf("R");
    } else if (PVvalue - tVvalue < 0) {
      tVvalue--;
      printf("L");
    }
    if (PHvalue - tHvalue > 0) {
      tHvalue++;
      printf("D");
    } else if (PHvalue - tHvalue < 0) {
      tHvalue--;
      printf("U");
    }
    printf("\n");
  }
}
