#include <stdio.h>
char RideBack[9][9],T[6],ans[4]={'L','U','R','D'};int a[4][2]={-1,0,0,-1,1,0,0,1};bool OK=true;
void dfs(int x, int y, int w, int deep) {if (deep) printf("%c",ans[w]);if (!x && !y && deep) OK=false;for (int j=(w+3)&3;OK;j=(j+1)&3) {int n_x=x+a[j][0],n_y=y+a[j][1];if (n_x>=0 && n_x<9 && n_y>=0 && n_y<9 && RideBack[n_y][n_x]=='1') dfs(x+a[j][0]*2,y+a[j][1]*2,j,deep+1);}}
int main() {int i,j,k;for (i=0;i<9;i++) {scanf("%s",&T);if (i&1) for (k=0,j=0;j<5;RideBack[i][k]=T[j++],k+=2); else for (k=1,j=0;j<4;RideBack[i][k]=T[j++],k+=2);}dfs(0,0,1,0);puts("");return 0;}