#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long MAX = INT_MAX;
const long long MOD = 1e9 + 7;
const long long sz = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tc = 1;
  while (tc--) {
    string s, h;
    cin >> s >> h;
    long long sx = s[0] - 'a', sy = s[1] - 'a';
    long long fx = h[0] - 'a', fy = h[1] - 'a';
    vector<string> ret;
    if (fx < sx) {
      long long d = min(sx - fx, abs(fy - sy));
      if (fy > sy) {
        while (d--) {
          ret.push_back("LU");
          sx--;
          sy++;
        }
      } else {
        while (d--) {
          ret.push_back("LD");
          sx--;
          sy--;
        }
      }
    } else if (fx > sx) {
      long long d = min(fx - sx, abs(fy - sy));
      if (fy > sy) {
        while (d--) {
          ret.push_back("RU");
          sx++;
          sy++;
        }
      } else {
        while (d--) {
          ret.push_back("RD");
          sx++;
          sy--;
        }
      }
    }
    if (fx != sx) {
      if (fx > sx) {
        while (fx - sx) {
          ret.push_back("R");
          sx++;
        }
      } else {
        while (sx - fx) {
          ret.push_back("L");
          sx--;
        }
      }
    }
    if (fy != sy) {
      if (fy > sy) {
        while (fy - sy) {
          ret.push_back("U");
          sy++;
        }
      } else {
        while (sy - fy) {
          ret.push_back("D");
          sy--;
        }
      }
    }
    cout << ret.size() << "\n";
    for (auto x : ret) cout << x << "\n";
  }
}
