#include <bits/stdc++.h>
using namespace std;
char s1[2][2][3] = {{{'L', 'D'}, {'L', 'U'}}, {{'R', 'D'}, {'R', 'U'}}},
     s2[2] = {'D', 'U'}, s3[2] = {'L', 'R'};
int main() {
  int a, b, c;
  char c1, c2;
  bool b1, b2;
  scanf("%c%d\n%c%d", &c1, &a, &c2, &b);
  a -= b;
  c = c1 - c2;
  b1 = c < 0;
  b2 = a < 0;
  a = abs(a);
  c = abs(c);
  if (a > c) {
    printf("%d\n", a);
    a -= c;
    for (int i = 0; i < c; ++i) puts(s1[b1][b2]);
    for (int i = 0; i < a; ++i) printf("%c\n", s2[b2]);
  } else {
    printf("%d\n", c);
    c -= a;
    for (int i = 0; i < a; ++i) puts(s1[b1][b2]);
    for (int i = 0; i < c; ++i) printf("%c\n", s3[b1]);
  }
}
