#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  int a, b, c, d;
  a = s[0] - 'a';
  b = s[1] - '1';
  c = t[0] - 'a';
  d = t[1] - '1';
  ++a;
  ++b;
  ++c;
  ++d;
  int x = abs(a - c);
  int y = abs(b - d);
  int z = min(x, y);
  cout << x + y - z << endl;
  if (a == c) {
    if (b > d) {
      for (int i = 1; i <= b - d; ++i) cout << "D" << endl;
    } else {
      for (int i = 1; i <= d - b; ++i) cout << "U" << endl;
    }
  } else if (a > c) {
    if (b == d) {
      for (int i = 1; i <= a - c; ++i) cout << "L" << endl;
    } else if (b > d) {
      for (int i = 1; i <= z; ++i) cout << "LD" << endl;
      a = a - z;
      b = b - z;
      if (a == c) {
        for (int i = 1; i <= b - d; ++i) cout << "D" << endl;
      } else if (b == d) {
        for (int i = 1; i <= a - c; ++i) cout << "L" << endl;
      }
    } else {
      for (int i = 1; i <= z; ++i) cout << "LU" << endl;
      a = a - z;
      b = b + z;
      if (a == c) {
        for (int i = 1; i <= d - b; ++i) cout << "U" << endl;
      } else if (b == d) {
        for (int i = 1; i <= a - c; ++i) cout << "L" << endl;
      }
    }
  } else {
    if (b == d) {
      for (int i = 1; i <= c - a; ++i) cout << "R" << endl;
    } else if (b > d) {
      for (int i = 1; i <= z; ++i) cout << "RD" << endl;
      a = a + z;
      b = b - z;
      if (a == c) {
        for (int i = 1; i <= b - d; ++i) cout << "D" << endl;
      } else if (b == d) {
        for (int i = 1; i <= c - a; ++i) cout << "R" << endl;
      }
    } else {
      for (int i = 1; i <= z; ++i) cout << "RU" << endl;
      a = a + z;
      b = b + z;
      if (a == c) {
        for (int i = 1; i <= d - b; ++i) cout << "U" << endl;
      } else if (b == d) {
        for (int i = 1; i <= c - a; ++i) cout << "R" << endl;
      }
    }
  }
}
