#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int a1, a2, b1, b2;
  a1 = s1[0] - 96, a2 = s1[1] - 48, b1 = s2[0] - 96, b2 = s2[1] - 48;
  string s[7];
  int i = 0;
  if (a1 < b1 && a2 > b2) {
    while (a1 < b1 && a2 > b2) {
      s[i].push_back('R');
      s[i].push_back('D');
      i++;
      a1++;
      a2--;
    }
  }
  if (a1 < b1 && a2 < b2) {
    while (a1 < b1 && a2 < b2) {
      s[i].push_back('R');
      s[i].push_back('U');
      i++;
      a1++;
      a2++;
    }
  }
  if (a1 > b1 && a2 > b2) {
    while (a1 > b1 && a2 > b2) {
      s[i].push_back('L');
      s[i].push_back('D');
      i++;
      a1--;
      a2--;
    }
  }
  if (a1 > b1 && a2 < b2) {
    while (a1 > b1 && a2 < b2) {
      s[i].push_back('L');
      s[i].push_back('U');
      i++;
      a1--;
      a2++;
    }
  }
  if (a1 == b1 && a2 < b2) {
    while (a2 < b2) {
      s[i].push_back('U');
      i++;
      a2++;
    }
  } else if (a1 == b1 && a2 > b2) {
    while (a2 > b2) {
      s[i].push_back('D');
      i++;
      a2--;
    }
  } else if (a2 == b2 && a1 < b1) {
    while (a1 < b1) {
      s[i].push_back('R');
      i++;
      a1++;
    }
  } else if (a2 == b2 && a1 > b1) {
    while (a1 > b1) {
      s[i].push_back('L');
      i++;
      a1--;
    }
  }
  cout << i << endl;
  for (int j = 0; j < i; j++) cout << s[j] << endl;
}
