#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  char c1, c2;
  int i1, i2;
  cin >> c1 >> i1;
  cin >> c2 >> i2;
  int hor = c2 - c1;
  char h;
  int cth = 0;
  if (hor > 0) {
    h = 'R';
    cth = (-1);
  } else if (hor < 0) {
    h = 'L';
    cth = 1;
  } else
    h = '\0';
  int ver = i2 - i1;
  char v;
  int ctv = 0;
  if (ver > 0) {
    v = 'U';
    ctv = (-1);
  } else if (ver < 0) {
    v = 'D';
    ctv = 1;
  } else
    v = '\0';
  int mn = min(abs(hor), abs(ver));
  int mx = max(abs(hor), abs(ver));
  cout << mx << endl;
  while (ver != 0 || hor != 0) {
    if (hor != 0) {
      cout << h;
      hor += cth;
    }
    if (ver != 0) {
      cout << v;
      ver += ctv;
    }
    cout << endl;
  }
  return 0;
}
