// your code goes here
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
string s, t;
cin >> s >> t;
cout << max(abs(s[0] - t[0]), abs(s[1] - t[1])) << endl;
while (s != t)
{
if (s[0] < t[0])
{
cout << "R";
s[0] += 1;
}
else if (s[0] > t[0])
{
cout << "L";
s[0] -= 1;
}
if (s[1] < t[1])
{
cout << "U";
s[1] += 1;
}
else if (s[1] > t[1])
{
cout << "D";
s[1] -= 1;
}
cout << endl;
}
return 0;
}
Ly8geW91ciBjb2RlIGdvZXMgaGVyZQojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAppbnQgbWFpbigpCnsKICAgIHN0cmluZyBzLCB0OwogICAgY2luID4+IHMgPj4gdDsKICAgIGNvdXQgPDwgbWF4KGFicyhzWzBdIC0gdFswXSksIGFicyhzWzFdIC0gdFsxXSkpIDw8IGVuZGw7CiAgICB3aGlsZSAocyAhPSB0KQogICAgewogICAgICAgIGlmIChzWzBdIDwgdFswXSkKICAgICAgICB7CiAgICAgICAgICAgIGNvdXQgPDwgIlIiOwogICAgICAgICAgICBzWzBdICs9IDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHNbMF0gPiB0WzBdKQogICAgICAgIHsKICAgICAgICAgICAgY291dCA8PCAiTCI7CiAgICAgICAgICAgIHNbMF0gLT0gMTsKICAgICAgICB9CiAKICAgICAgICBpZiAoc1sxXSA8IHRbMV0pCiAgICAgICAgewogICAgICAgICAgICBjb3V0IDw8ICJVIjsKICAgICAgICAgICAgc1sxXSArPSAxOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChzWzFdID4gdFsxXSkKICAgICAgICB7CiAgICAgICAgICAgIGNvdXQgPDwgIkQiOwogICAgICAgICAgICBzWzFdIC09IDE7CiAgICAgICAgfQogCiAgICAgICAgY291dCA8PCBlbmRsOwogICAgfQogICAgcmV0dXJuIDA7Cn0=