#include <bits/stdc++.h>
using namespace std;
int main() {
  char c;
  int x1, y1, x2, y2;
  cin >> c >> y1;
  x1 = c - 'a' + 1;
  cin >> c >> y2;
  x2 = c - 'a' + 1;
  cout << max(abs(x1 - x2), abs(y1 - y2)) << endl;
  int stepX = (x2 > x1) ? 1 : -1, stepY = (y2 > y1) ? 1 : -1;
  char x = (stepX == 1) ? 'R' : 'L', y = (stepY == 1) ? 'U' : 'D';
  while (x1 != x2 || y1 != y2) {
    if (x1 != x2) {
      x1 += stepX;
      cout << x;
    }
    if (y1 != y2) {
      y1 += stepY;
      cout << y;
    }
    cout << endl;
  }
}
