#include <bits/stdc++.h>
using namespace std;
void solve() {
  string a, b;
  cin >> a >> b;
  cout << max(abs(a[0] - b[0]), abs(a[1] - b[1])) << "\n";
  while (a != b) {
    if ((int)a[0] < (int)b[0]) {
      cout << "R";
      a[0]++;
    } else if ((int)a[0] > (int)b[0]) {
      cout << "L";
      a[0]--;
    }
    if ((int)a[1] < (int)b[1]) {
      cout << "U";
      a[1]++;
    } else if ((int)a[1] > (int)b[1]) {
      cout << "D";
      a[1]--;
    }
    cout << "\n";
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  solve();
  return 0;
}
