Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

road_h = [[0 for i in range(6)] for j in range(7)] #?¨??????????
road_v = [[0 for i in range(7)] for j in range(6)] #????????????
ax = ay = 1
ad_list = ['L', 'R', 'U', 'D']

for i in range(9):
    line = str(raw_input())
    if i % 2 == 0:
        for j in range(4):
            if line[j] == '1':
                road_h[1+i/2][1+j] += 1
    else:
        for j in range(5):
            if line[j] == '1':
                road_v[1+i/2][1+j] += 1

ad = 1
ax += 1
ans = 'R'
while True:
    if ax == 1 and ay == 1:
        break
    if ad == 0:     #?????????
        if road_v[ay][ax]:
            ay += 1
            ad = 3
        elif road_h[ay][ax-1]:
            ax -= 1
        elif road_v[ay-1][ax]:
            ay -= 1
            ad = 2
    elif ad == 1:   #?????????
        if road_v[ay-1][ax]:
            ay -= 1
            ad = 2
        elif road_h[ay][ax]:
            ax += 1
        elif road_v[ay][ax]:
            ay += 1
            ad = 3
    elif ad == 2:   #?????????
        if road_h[ay][ax-1]:
            ax -= 1
            ad = 0
        elif road_v[ay-1][ax]:
            ay -= 1
        elif road_h[ay][ax]:
            ax += 1
            ad = 1
    elif ad == 3:   #?????????
        if road_h[ay][ax]:
            ax += 1
            ad = 1
        elif road_v[ay][ax]:
            ay += 1
        elif road_h[ay][ax-1]:
            ax -= 1
            ad = 0
    ans = ans + ad_list[ad]
print ans

Fixed submission:
# -*- coding: utf-8 -*-

road_h = [[0 for i in range(6)] for j in range(7)] #?¨??????????
road_v = [[0 for i in range(7)] for j in range(6)] #????????????
ax = ay = 1
ad_list = ['L', 'R', 'U', 'D']

for i in range(9):
    line = str(raw_input())
    if i % 2 == 0:
        for j in range(4):
            if line[j] == '1':
                road_h[1+i/2][1+j] += 1
    else:
        for j in range(5):
            if line[j] == '1':
                road_v[1+i/2][1+j] += 1

ad = 1
ax += 1
ans = 'R'
while True:
    if ax == 1 and ay == 1:
        break
    if ad == 0:     #?????????
        if road_v[ay][ax]:
            ay += 1
            ad = 3
        elif road_h[ay][ax-1]:
            ax -= 1
        elif road_v[ay-1][ax]:
            ay -= 1
            ad = 2
        else:
            ax += 1
            ad = 1
    elif ad == 1:   #?????????
        if road_v[ay-1][ax]:
            ay -= 1
            ad = 2
        elif road_h[ay][ax]:
            ax += 1
        elif road_v[ay][ax]:
            ay += 1
            ad = 3
        else:
            ax -= 1
            ad = 0
    elif ad == 2:   #?????????
        if road_h[ay][ax-1]:
            ax -= 1
            ad = 0
        elif road_v[ay-1][ax]:
            ay -= 1
        elif road_h[ay][ax]:
            ax += 1
            ad = 1
        else:
            ay += 1
            ad = 3
    elif ad == 3:   #?????????
        if road_h[ay][ax]:
            ax += 1
            ad = 1
        elif road_v[ay][ax]:
            ay += 1
        elif road_h[ay][ax-1]:
            ax -= 1
            ad = 0
        else:
            ay -= 1
            ad = 2
    ans = ans + ad_list[ad]
print ans