#include <bits/stdc++.h>
using namespace std;
const long long INF = 999999999999999999;
const double PI = acos(-1.0);
void stop() { exit(0); }
long long n = 0;
string ans[100];
int main() {
  ios::sync_with_stdio(false);
  string s1, s2;
  cin >> s1 >> s2;
  while (s1 != s2) {
    if (s2[0] < s1[0] && s2[1] < s1[1]) {
      ans[n] = "LD";
      n++;
      s1[0]--;
      s1[1]--;
    } else if (s2[0] > s1[0] && s2[1] < s1[1]) {
      ans[n] = "RD";
      n++;
      s1[0]++;
      s1[1]--;
    } else if (s2[0] > s1[0] && s2[1] > s1[1]) {
      ans[n] = "RU";
      n++;
      s1[0]++;
      s1[1]++;
    } else if (s2[0] < s1[0] && s2[1] > s1[1]) {
      ans[n] = "LU";
      n++;
      s1[0]--;
      s1[1]++;
    } else if (s2[0] == s1[0] && s2[1] < s1[1]) {
      ans[n] = "D";
      n++;
      s1[1]--;
    } else if (s2[0] == s1[0] && s2[1] > s1[1]) {
      ans[n] = "U";
      n++;
      s1[1]++;
    } else if (s2[0] > s1[0] && s2[1] == s1[1]) {
      ans[n] = "R";
      n++;
      s1[0]++;
    } else if (s2[0] < s1[0] && s2[1] == s1[1]) {
      ans[n] = "L";
      n++;
      s1[0]--;
    }
  }
  cout << n << endl;
  for (long long i = 0; i < n; i++) {
    cout << ans[i] << endl;
  }
  stop();
}
