/*棋盘长度 codeforces 3-A*/
#include <stdio.h>
#include <algorithm>
#include <string>
#include <queue>
#include <iostream>
using namespace std;
const int MAXN = 10;
struct Grid
{
int row;
int col;
Grid(){};
Grid(int x, int y) : row(x), col(y){}
bool operator!=(const Grid &g) const
{
if(row != g.row || col != g.col)
return true;
return false;
}
};
string Hash[10] = {"LD", "D", "RD", "L", "NONE", "R", "LU", "U", "RU"};
int chessBoard[MAXN][MAXN];
int dis[MAXN][MAXN];
Grid father[MAXN][MAXN];
string mov[MAXN][MAXN];
bool visit[MAXN][MAXN];
void Init()
{
for(int i = 0; i < 10; ++i)
{
visit[i][0] = visit[i][9] = visit[9][i] = visit[0][i] = true;
}
}
void BFS(Grid start)
{
queue<Grid> que;
que.push(start);
dis[start.row][start.col] = 0;
visit[start.row][start.col] = true;
while(!que.empty())
{
Grid temp = que.front();
int count = 0;
for(int i = -1; i <= 1; ++i)
for(int j = -1; j <= 1; ++j)
{
int x = temp.row + i, y = temp.col + j;
if(!visit[x][y])
{
visit[x][y] = true;
mov[x][y] = Hash[count];
dis[x][y] = dis[temp.row][temp.col] + 1;
father[x][y] = temp;
que.push(Grid(x, y));
}
++count;
}
que.pop();
}
}
void PrintPath(Grid end, Grid start)
{
if(end != start)
{
PrintPath(father[end.row][end.col], start);
cout << mov[end.row][end.col] << endl;
}
}
int main()
{
#ifdef _LOCAL
freopen("F://input.txt", "r", stdin);
#endif
char a, b;
int x, y;
scanf("%c%d", &a, &x);
getchar();
scanf("%c%d", &b, &y);
Grid start(x, a - 'a' + 1), end(y, b - 'a' + 1);
Init();
BFS(start);
printf("%d\n", dis[end.row][end.col]);
PrintPath(end, start);
return 0;
}