#include <bits/stdc++.h>
using namespace std;
string a, b;
int count = 0;
void move(char x, char y, char z, char t) {
  if (int(x) < int(z)) {
    cout << 'R';
    a[0] = char(int(x) + 1);
  } else if (int(x) > int(z)) {
    cout << 'L';
    a[0] = char(int(x) - 1);
  }
  if (int(y) < int(t)) {
    cout << 'U';
    a[1] = char(int(y) + 1);
  } else if (int(y) > int(t)) {
    cout << 'D';
    a[1] = char(int(y) - 1);
  }
  if (a != b) cout << endl;
  return;
}
int main() {
  cin >> a >> b;
  int f = int(a[0] - b[0]);
  int g = int(b[0] - a[0]);
  if (f < g) f = g;
  g = int(a[1] - b[1]);
  if (f < g) f = g;
  g = int(b[1] - a[1]);
  if (f < g)
    cout << g;
  else
    cout << f;
  cout << endl;
  while (a != b) move(a[0], a[1], b[0], b[1]);
  return 0;
}
