#include <bits/stdc++.h>
using namespace std;
char x[] = {'R', 'L'};
char y[] = {'U', 'D'};
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int x1, x2, y1, y2;
  x1 = s1[0] - 'a';
  y1 = s1[1] - '0';
  x2 = s2[0] - 'a';
  y2 = s2[1] - '0';
  cout << max(abs(y1 - y2), abs(x1 - x2)) << endl;
  while (x1 != x2 || y1 != y2) {
    if (x1 < x2) {
      cout << x[0];
      x1++;
    } else if (x1 > x2) {
      cout << x[1];
      x1--;
    }
    if (y1 < y2) {
      cout << y[0];
      y1++;
    } else if (y1 > y2) {
      cout << y[1];
      y1--;
    }
    cout << endl;
  }
  return 0;
}
