#include <bits/stdc++.h>
using namespace std;
const int N = 55;
char g[N][N];
int r = 30, c = 50;
struct node
{
int x, y;
string path;
};
char dire[4] = {'D', 'L', 'R', 'U'};
int dx[] = {1, 0, 0, -1}, dy[] = {0, -1, 1, 0};
int dist[N][N];
int bfs(node st, node ed)
{
queue<node> q;
q.push(st);
memset(dist, -1, sizeof dist);
dist[st.x][st.y] = 0;
while (q.size())
{
auto t = q.front();
q.pop();
for (int i = 0; i < 4; i++)
{
node next = {t.x + dx[i], t.y + dy[i], ""};
if (next.x < 0 || next.x >= r || next.y < 0 || next.y >= c) continue;
if (dist[next.x][next.y] != -1) continue;
if (g[next.x][next.y] == '1') continue;
dist[next.x][next.y] = dist[t.x][t.y] + 1;
next.path = t.path + dire[i];
if (next.x == ed.x && next.y == ed.y)
{
cout << next.path << '\n';
return dist[next.x][next.y];
}
q.push(next);
}
}
return -1;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
for (int i = 0; i < r; i++) cin >> g[i];
node st = {0, 0, ""}, ed = {29, 49, ""};
int distance = bfs(st, ed);
if (distance != -1 ) cout << distance << '\n';
else cout << "None" << '\n';
return 0;
}