Problem:
 Score : 300 points    Problem Statement Dolphin resides in two-dimensional Cartesian plane, with the positive x -axis pointing right and the positive y -axis pointing up. Currently, he is located at the point (sx,sy) . In each second, he can move up, down, left or right by a distance of 1 . Here, both the x - and y -coordinates before and after each movement must be integers. He will first visit the point (tx,ty) where sx < tx and sy < ty , then go back to the point (sx,sy) , then visit the point (tx,ty) again, and lastly go back to the point (sx,sy) . Here, during the whole travel, he is not allowed to pass through the same point more than once, except the points (sx,sy) and (tx,ty) . Under this condition, find a shortest path for him.      Constraints  -1000 ≤ sx < tx ≤ 1000   -1000 ≤ sy < ty ≤ 1000   sx,sy,tx and ty are integers.         Input The input is given from Standard Input in the following format:  sx  sy  tx  ty       Output Print a string S that represents a shortest path for Dolphin. The i -th character in S should correspond to his i -th movement. The directions of the movements should be indicated by the following characters:   U : Up  D : Down  L : Left  R : Right   If there exist multiple shortest paths under the condition, print any of them.        Sample Input 1 0 0 1 2      Sample Output 1 UURDDLLUUURRDRDDDLLU  One possible shortest path is:   Going from (sx,sy) to (tx,ty) for the first time: (0,0) → (0,1) → (0,2) → (1,2)  Going from (tx,ty) to (sx,sy) for the first time: (1,2) → (1,1) → (1,0) → (0,0)  Going from (sx,sy) to (tx,ty) for the second time: (0,0) → (-1,0) → (-1,1) → (-1,2) → (-1,3) → (0,3) → (1,3) → (1,2)  Going from (tx,ty) to (sx,sy) for the second time: (1,2) → (2,2) → (2,1) → (2,0) → (2,-1) → (1,-1) → (0,-1) → (0,0)        Sample Input 2 -2 -2 1 1      Sample Output 2 UURRURRDDDLLDLLULUUURRURRDDDLLDL

Solution (Python):
sx, sy, tx, ty = (int(i) for i in input().split())
s=""
x = sx
y = sy
while y!=ty:
    y+=1
    s+="U"
while x!=tx:
    x+=1
    s+="R"
while y!=sy:
    y-=1
    s+="D"
while x!=sx:
    x-=1
    s+="L"
x-=1
s+="L"
while y!=ty+1:
    y+=1
    s+="U"
while x!=tx:
    x+=1
    s+="R"
y-=1
s+="D"
x+=1
s+="R"
while y!=sy-1:
    y-=1
    s+="D"
while x!=sx:
    x-=1
    s+="L"
s+=("U")
print(s)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
ans = ''

for _ in range(tx - sx):
    ans += 'R'
for _ in range(ty - sy):
    ans += 'U'

for _ in range(tx - sx):
    ans += 'L'
for _ in range(ty - sy):
    ans += 'D'

ans += 'D'
for _ in range(tx - sx + 1):
    ans += 'R'
for _ in range(ty - sy + 1):
    ans += 'U'
ans += 'L'

ans += 'U'
for _ in range(tx - sx + 1):
    ans += 'L'
for _ in range(ty - sy + 1):
    ans += 'D'
ans += 'R'
print(ans)

Solution (Python):
def diff(a: tuple, b: tuple) -> int:
    return abs(a[0] - b[0]) + abs(a[1] - b[1])


sx, sy, tx, ty = map(int, input().split())
start = (1, 1)
target = (tx - sx + start[0], ty - sy + start[1])

visited = [[False] * (ty - sy + 3) for _ in range(tx - sx + 3)]
now = start
dic = dict()
ans = ""


dic['U'] = (0, 1)
dic['D'] = (0, -1)
dic['L'] = (-1, 0)
dic['R'] = (1, 0)

for turn in range(4):
    if turn % 2 == 0:
        goal = target
    else:
        goal = start

    while now != goal:
        cnddt = []
        for k in "UDLR":
            nxt = (now[0] + dic[k][0], now[1] + dic[k][1])
            if nxt[0] < 0 or target[0] + 1 < nxt[0]:
                pass
            elif nxt[1] < 0 or target[1] + 1 < nxt[1]:
                pass
            elif nxt == goal or not visited[nxt[0]][nxt[1]]:
                cnddt.append((k, diff(nxt, goal) - diff(now, goal)))
        cnddt = sorted(cnddt, key=lambda x: x[1])
        k = cnddt[0][0]
        ans += k
        nxt = (now[0] + dic[k][0], now[1] + dic[k][1])
        visited[nxt[0]][nxt[1]] = True
        now = nxt

print(ans)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

'''
route1 : R * (tx - sx) -> U * (ty - sy)
route2 : L * (tx - sx) -> D * (ty - sy)
route3 : D * 1 -> R * (tx - sx + 1) -> U * (ty - sy + 1) + L * 1
route4 : U * 1 -> L * (ty - sy + 1) -> D * (tx - sx + 1) + R * 1
'''

ans = []
sax = tx - sx
say = ty - sy

for i in range(sax):
    ans.append('R')

for i in range(say):
    ans.append('U')

for i in range(sax):
    ans.append('L')
    
for i in range(say):
    ans.append('D')

ans.append('D')

for i in range(sax + 1):
    ans.append('R')

for i in range(say + 1):
    ans.append('U')

ans.append('L')

ans.append('U')

for i in range(sax + 1):
    ans.append('L')

for i in range(say + 1):
    ans.append('D')

ans.append('R')

print(''.join(ans))

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
dx = tx - sx
dy = ty - sy
print("R"*dx + "U"*dy + "L"*dx + "D"*dy + "L" + "U"*(dy+1) + "R"*(dx+1) + "D" + "R" + "D"*(dy+1) + "L"*(dx+1) + "U")

Solution (Python):
A,B,C,D=map(int,input().split())
ans=''
for a in range(C-A) :
	ans=ans+'R'
for a in range(D-B) :
	ans=ans+'U'
for a in range(C-A) :
	ans=ans+'L'
for a in range(D-B) :
	ans=ans+'D'
ans=ans+'L'
for a in range(D-B+1) :
	ans=ans+'U'
for a in range(C-A+1) :
	ans=ans+'R'
ans=ans+'D'
ans=ans+'R'
for a in range(D-B+1) :
	ans=ans+'D'
for a in range(C-A+1) :
	ans=ans+'L'
ans=ans+'U'
print(ans)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
dx, dy = tx - sx, ty - sy

ans = ""
for _ in range(dy):
    ans += "U"
for _ in range(dx):
    ans += "R"
for _ in range(dy):
    ans += "D"
for _ in range(dx):
    ans += "L"
ans += "L"

for _ in range(dy + 1):
    ans += "U"
for _ in range(dx + 1):
    ans += "R"
ans += "D"
ans += "R"

for _ in range(dy + 1):
    ans += "D"
for _ in range(dx + 1):
    ans += "L"
ans += "U"

print(ans)

Solution (Python):
def main():
    sx, sy, tx, ty = map(int, input().split())
    dx = tx - sx
    dy = ty - sy
    print('U' * dy + 'R' * dx, end='')
    print('D' * dy + 'L' * dx, end='')
    print('L' + 'U' * (dy + 1) + 'R' * (dx + 1) + 'D', end='')
    print('R' + 'D' * (dy + 1) + 'L' * (dx + 1) + 'U')


if __name__ == '__main__':
    main()

Solution (Python):
sx,sy,tx,ty = map(int, input().split())
x = tx-sx
y = ty-sy
a = "R"*x+"U"*y
b = "L"*x+"D"*y
c = "D"+"R"*(x+1)+"U"*(y+1)+"L"
d = "U"+"L"*(x+1)+"D"*(y+1)+"R"
print(a+b+c+d)

Solution (Python):
sx, sy, tx, ty=map(int, input().split())
print("D"+"R"*(tx-sx+1)+"U"*(ty-sy+1)+"L"*(tx-sx+1)+"D"*(ty-sy)+
      "L"+"U"*(ty-sy+1)+"R"*(tx-sx+1)+"D"*(ty-sy+1)+"L"*(tx-sx))

Solution (Python):
x, y, tx, ty = map(int, input().split())
tx, ty = tx-x, ty-y
s = ty*'U' + tx*'R' +ty*'D' + tx*'L'
s1 = 'L' + 'U'*(ty+1) + 'R'*(tx+1) + 'D' + 'R' +(ty+1)*'D' + 'L'*(tx+1) + 'U'
print(s+s1)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
nsx, nsy = sx, sy
while nsy < ty:
    nsy += 1
    print("U", end = "")
while nsx <= tx:
    nsx += 1
    print("R", end = "")
while nsy >= sy:
    nsy -= 1
    print("D", end="")
while nsx > sx:
    nsx -= 1
    print("L", end = "")
nsy += 1
print("U", end = "")
nsx -= 1
print("L", end = "")
while nsy <= ty:
    nsy += 1
    print("U", end = "")
while nsx < tx:
    nsx += 1
    print("R", end = "")
while nsy > sy:
    nsy -= 1
    print("D", end="")
while nsx > sx:
    nsx -= 1
    print("L", end = "")

Solution (Python):
sx, sy, tx, ty = map(int,input().split())
h = ty-sy
w = tx-sx
ans = ""
def f(k, ch):
    global ans
    for i in range(k):
        ans += ch

f(h, "U")
f(w, "R")
f(h, "D")
f(w, "L")
f(1, "L")
f(h+1, "U")
f(w+1, "R")
f(1, "D")
f(1, "R")
f(h+1, "D")
f(w+1, "L")
f(1, "U")
print(ans)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
dx = tx - sx
dy = ty - sy
for i in range(dy):
  print('U', end = '')
for i in range(dx):
  print('R', end = '')
for i in range(dy):
  print('D', end = '')
for i in range(dx):
  print('L', end = '')
print('L', end = '')
for i in range(dy + 1):
  print('U', end = '')
for i in range(dx + 1):
  print('R', end = '')
print('DR', end = '')
for i in range(dy + 1):
  print('D', end = '')
for i in range(dx + 1):
  print('L', end = '')
print('U')

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

H = tx - sx
W = ty - sy

r1 = ["U" for i in range(W)]
r2 = ["D" for i in range(W)]
for i in range(H):
    r1 += "R"
    r2 += "L"
STR1 = ''.join(r1)
STR2 = ''.join(r2)
print(STR1+STR2+"LU"+STR1+"RDRD"+STR2+"LU")

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
dx = tx - sx
dy = ty - sy
a = iter([dx, dy, dx, dy+1, dx+1, dy+1, dx+1, dy+1,])
w = "R"*next(a) + "U"*next(a) + "L"*next(a) + "D"*next(a) + "R"*next(a) + "U"*next(a) + "L" + "U" + "L"*next(a) + "D"*next(a) + "R"
print(w)

Solution (Python):
sx,sy,gx,gy=map(int,input().split())
x,y=gx-sx,gy-sy
print('U'*y+'R'*x+'D'*y+'L'*(x+1)+'U'*(y+1)+'R'*(x+1)+'D'*1+'R'*1+'D'*(y+1)+'L'*(x+1)+'U'*1)

Solution (Python):
sx,sy,tx,ty=map(int,input().split())
S="U"*(ty-sy)+"R"*(tx-sx)+"U"+"L"*(tx-sx+1)+"D"*(ty-sy+1)+"R"+"D"+"R"*(tx-sx+1)+"U"*(ty-sy+1)+"L"+"D"*(ty-sy)+"L"*(tx-sx)
print(S)

Solution (Python):
a,b,c,d=map(int,input().split())
ans ='R'*(c-a)+'U'*(d-b)+'L'*(c-a)+'D'*(d-b+1)+'R'*(c-a+1)+'U'*(d-b+1)+'L'+'U'+'L'*(c-a+1)+'D'*(d-b+1)+'R'
print(ans)

Solution (Python):
a,b,c,d=map(int,input().split())
ans=''

for i in range(c-a):
    ans +='R'
for i in range(d-b):
    ans +='U'
for i in range(c-a):
    ans +='L'
for i in range(d-b+1):
    ans +='D'
for i in range(c-a+1):
    ans +='R'
for i in range(d-b+1):
    ans +='U'
ans +='L'
ans +='U'
for i in range(c-a+1):
    ans +='L'
for i in range(d-b+1):
    ans +='D'
ans+='R'
print(ans)

Solution (Python):
sx,sy,tx,ty = map(int,input().split())
for t in range(sy,ty):
  print("U",end="")
for t in range(sx,tx):
  print("R",end="")
for t in range(sy,ty):
  print("D",end="")
for t in range(sx,tx):
  print("L",end="")
print("L",end="")
for t in range(sy,ty+1):
  print("U",end="")
for t in range(sx,tx+1):
  print("R",end="")
print("D",end="")
print("R",end="")
for t in range(sy,ty+1):
  print("D",end="")
for t in range(sx,tx+1):
  print("L",end="")
print("U")

Solution (Python):
sx, sy, tx, ty = (int(i) for i in input().split())  
dx = tx - sx
dy = ty - sy
st = "U"*dy + "R"*dx + "D"*dy + "L"*(dx+1) + "U"*(dy+1) + "R"*(dx+1) + "DR" + "D"*(dy+1) + "L"*(dx+1) + "U"
print(st)

Solution (Python):
sx,sy,tx,ty = map(int,input().split())
ans = ""


dx = tx - sx
dy = ty - sy


for i in range(dx):
    ans += "R"
for i in range(dy):
    ans += "U"

for i in range(dx):
    ans += "L"
for i in range(dy):
    ans += "D"


ans += "D"
for i in range(dx+1):
    ans += "R"
for i in range(dy+1):
    ans += "U"
ans += "L"

ans += "U"
for i in range(dx+1):
    ans += "L"
for i in range(dy+1):
    ans += "D"
ans += "R"

print(ans)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

ans = ""
for i in range(ty - sy):
    ans += "U"
for i in range(tx - sx):
    ans += "R"
for i in range(ty - sy):
    ans += "D"
for i in range(tx - sx + 1):
    ans += "L"
for i in range(ty - sy + 1):
    ans += "U"
for i in range(tx - sx + 1):
    ans += "R"
ans += "D"
ans += "R"
for i in range(ty - sy + 1):
    ans += "D"
for i in range(tx - sx + 1):
    ans += "L"
ans += "U"

print(ans)

Solution (Python):
sx, sy, tx, ty = [int(_) for _ in input().split()]
dx = tx-sx
dy = ty-sy
print('R'*dx+'U'*(dy+1)+'L'*(dx+1)+'D'*(dy+1)+'R' +
      'D'+'R'*(dx+1)+'U'*(dy+1)+'L'*(dx+1)+'D'*dy)

Solution (Python):


sx,sy,tx,ty = map(int, input().split())

res = []

for _ in range(sx,tx):
    res.append("R")
for _ in range(sy,ty):
    res.append("U")
for _ in range(sx,tx):
    res.append("L")
for _ in range(sy,ty):
    res.append("D")
res.append("D")
for _ in range(sx,tx):
    res.append("R")
res.append("R")
for _ in range(sy,ty):
    res.append("U")
res.append("ULU")
for _ in range(sx,tx):
    res.append("L")
res.append("L")
for _ in range(sy,ty):
    res.append("D")
res.append("DR")

print("".join(res))

Solution (Python):
_sx, _sy, _tx, _ty = [int(i) for i in input().split()]
sx, sy, tx, ty = _sx, _sy, _tx, _ty
"""

if sx != tx and sy != ty:
    if tx > sx and ty < sy:
        ty += (ty - sy) * 2
    elif tx < sx and ty > sy:
        tx += (tx - sx) * 2
    elif tx < sx and ty < sy:
        tx += (tx - sx) * 2
        ty += (ty - sy) * 2
elif sx == tx:
    if ty < sy:
        ty += (ty - sy) * 2
else:  
    if tx < sx:
        tx += (tx - sx) * 2
    sy = sx
    ty = sx
"""
path = ""

for i in range(tx - sx):
    path += "R"
for i in range(ty - sy):
    path += "U"

for i in range(tx - sx):
    path += "L"
for i in range(ty - sy):
    path += "D"

path += "D"
for i in range(tx - sx + 1):
    path += "R"
for i in range(ty - sy + 1):
    path += "U"
path += "L"

path += "U"
for i in range(tx - sx + 1):
    path += "L"
for i in range(ty - sy + 1):
    path += "D"
path += "R"
"""
else:  
    if tx > sx:
        for i in range(tx - sx):
            path += "U"
        path += "R"
        for i in range(tx - sx):
            path += "D"
        path += "L"
        path += "DRR"
        for i in range(tx - sx + 2):
            path += "U"
        path += "LLDL"
        for i in range(tx - sx):
            path += "D"
        path += "R"
"""
print(path)
"""
if sx != tx and sy != ty:
    if tx > sx:
        for i in range(tx - sx):
            path += "R"
    else:
        for i in range(sx - tx):
            path += "L"
    if ty > sy:
        for i in range(ty - sy):
            path += "U"
    else:
        for i in range(sy - ty):
            path += "D"
    
    if tx > sx:
        for i in range(tx - sx):
            path += "L"
    else:
        for i in range(sx - tx):
            path += "R"
    if ty > sy:
        for i in range(ty - sy):
            path += "D"
    else:
        for i in range(sy - ty):
            path += "U"
    
    if tx > sx and ty > sy:
        path += "D"
    elif tx > sx
    if tx > sx:
        for i in range(tx - sx):
            path += "R"
    else:
        for i in range(sx - tx):
            path += "L"
    if ty > sy:
        for i in range(ty - sy):
            path += "U"
    else:
        for i in range(sy - ty):
            path += "D"

elif sx == tx:
    if ty > sy:
        for i in range(ty - sy):
            path += "U"
        path += "R"
        for i in range(ty - sy):
            path += "D"
        path += "L"
    else:
        for i in range(sy - ty):
            path += "D"
        path += "R"
        for i in range(sy - ty):
            path += "U"
        path += "L"
else:  
    if tx > sx:
        for i in range(tx - sx):
            path += "R"
        path += "U"
        for i in range(tx - sx):
            path += "L"
        path += "D"
    else:
        for i in range(sx - tx):
            path += "L"
        path += "U"
        for i in range(sx - tx):
            path += "R"
        path += "D"
print(path)
"""

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

for _ in range(tx-sx):
    print('R', end = '')

for _ in range(ty-sy):
    print('U', end = '')

for _ in range(tx-sx):
    print('L', end = '')

for _ in range(ty-sy):
    print('D', end = '')

print('D', end = '')

for _ in range(tx-sx+1):
    print('R', end = '')

for _ in range(ty-sy+1):
    print('U', end = '')

print('LU', end='')

for _ in range(tx-sx+1):
    print('L', end = '')

for _ in range(ty-sy+1):
    print('D', end = '')

print('R')

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
X = tx - sx
Y = ty - sy

first = 'U'*Y + 'R'*X + 'D'*Y + 'L'*X
second = 'L'+ 'U'*(Y+1) + 'R'*(X+1) + 'DR' + 'D'*(Y+1) + 'L'*(X+1) + 'U' 
print(first+second)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
dx = tx - sx
dy = ty - sy
print('U' * dy + 'R' * dx + 'D' * dy + 'L' * dx
      + 'L' + 'U' * (dy + 1) + 'R' * (dx + 1) + 'D'
      + 'R' + 'D' * (dy + 1) + 'L' * (dx + 1) + 'U')

Solution (Python):


sx, sy, tx, ty = [ int(i) for i in input().split() ]
x = tx - sx
y = ty - sy
s = ''
s += 'U' * y + 'R' * x
s += 'D' * y + 'L' * x
s += 'L' + 'U' * (y+1) + 'R' * (x+1) + 'D'
s += 'R' + 'D' * (y+1) + 'L' * (x+1) + 'U'
print(s)

Solution (Python):




"""
https://beta.atcoder.jp/contests/abc051/tasks/abc51_c
"""

import sys
import math
from inspect import currentframe

def debug(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args), file=sys.stderr)

sx, sy, tx, ty = map(int, input().split())


dx = tx - sx
dy = ty - sy

s_to_t_1st = 'U' * dy + 'R' * dx
t_to_s_1st = 'D' * dy + 'L' * dx


s_to_t_2nd = 'L' + 'U' * (dy + 1) + 'R' * (dx + 1) + 'D'
t_to_s_2nd = 'R' + 'D' * (dy + 1) + 'L' * (dx + 1) + 'U'

print(s_to_t_1st + t_to_s_1st + s_to_t_2nd + t_to_s_2nd)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

ans = ""
y_len = ty-sy
x_len = tx-sx

for _ in range(y_len):
    ans = ans+"U"

for _ in range(x_len):
    ans = ans+"R"

for _ in range(y_len):
    ans = ans+"D"

for _ in range(x_len):
    ans = ans+"L"

ans = ans+"L"

for _ in range(y_len+1):
    ans = ans+"U"

for _ in range(x_len+1):
    ans = ans+"R"

ans = ans+"D"
ans = ans+"R"

for _ in range(y_len+1):
    ans = ans+"D"

for _ in range(x_len+1):
    ans = ans+"L"

ans = ans+"U"
print(ans)

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    sx, sy, tx, ty = li_input()

    ans = ""
    ans += "U" * (ty - sy)
    ans += "R" * (tx - sx)
    ans += "D" * (ty - sy)
    ans += "L" * (tx - sx)
    ans += "L"
    ans += "U" * ((ty - sy) + 1)
    ans += "R" * ((tx - sx) + 1)
    ans += "D"
    ans += "R"
    ans += "D" * ((ty - sy) + 1)
    ans += "L" * ((tx - sx) + 1)
    ans += "U"

    print(ans)


main()

Solution (Python):
sx, sy, tx, ty = map(int, input().split(' '))
h = ty - sy
w = tx - sx
p = 'U'*h+'R'*w
r = 'D'*h+'L'*w
print(p+r+'LU'+p+'RDRD'+r+'LU')

Solution (Python):
a=list(map(int,input().split()))
px=a[0]
py=a[1]
ans=""
while px!=a[2]:
    ans+="R"
    px+=1
while py!=a[3]:
    ans+="U"
    py+=1
while px!=a[0]:
    ans+="L"
    px-=1
while py!=a[1]:
    ans+="D"
    py-=1
ans+="D"
py-=1
while px!=a[2]+1:
    ans+="R"
    px+=1
while py!=a[3]:
    ans+="U"
    py+=1
ans+="LU"
px-=1
py+=1
while px!=a[0]-1:
    ans+="L"
    px-=1
while py!=a[1]:
    ans+="D"
    py-=1
ans+="R"
print(ans)

Solution (Python):
sx,sy,tx,ty=map(int,input().split())
a=tx-sx
b=ty-sy
L="R"*a+"U"*b +"L"*a+"D"*b+"D"+"R"*(a+1)+"U"*(b+1)+"LU"+"L"*(a+1)+"D"*(b+1)+"R"
print(L)

Solution (Python):
sx, sy, tx, ty = [int(x) for x in input().split()]
dx = tx - sx
dy = ty - sy
print(dy*"U" + dx*"R" + dy*"D" + dx*"L" + "L" + (dy+1)*"U" + (dx+1)*"R" + "D" + "R" + (dy+1)*"D" + (dx+1)*"L" + "U")

Solution (Python):
sx, sy, tx, ty = map( int, input().split())
y = ty - sy
x = tx - sx
ans = "U"*y + "R"*x + "D"*y + "L"*x + "L" +  "U"*(y+1) + "R"*(x+1) + "D" + "R" + "D"*(y+1) + "L"*(x+1)+"U"
print(ans)

Solution (Python):
def ud(y):
    if y > 0:
        return 'U' * abs(y)
    else:
        return 'D' * abs(y)
def lr(x):
    if x > 0:
        return 'R' * abs(x)
    else:
        return 'L' * abs(x)

(sx,sy,tx,ty) = list(map(int, input().split()))

dx = tx - sx
dy = ty - sy

dx1 = dx // abs(dx)
dy1 = dy // abs(dy)

strs = ud(dy) + lr(dx) + ud(dy * -1) + lr(dx * -1)
strs += lr(dx1 * -1) + ud(dy + dy1) + lr(dx + dx1) + ud(dy1 * -1)
strs += lr(dx1) + ud((dy + dy1) * -1) + lr((dx + dx1) * -1) + ud(dy1)

print(strs)

Solution (Python):

sx, sy, tx, ty = map(int, input().split())

pos = (sx, sy)


print("L", end="")
for i in range(ty - sy + 1): print("U", end="")
for i in range(tx - sx + 1): print("R", end="")
print("D", end="")


print("R", end="")
for i in range(ty - sy + 1): print("D", end="")
for i in range(tx - sx + 1): print("L", end="")
print("U", end="")


for i in range(ty - sy): print("U", end="")
for i in range(tx - sx): print("R", end="")


for i in range(ty - sy): print("D", end="")
for i in range(tx - sx): print("L", end="")
print("")

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

for _ in range(tx-sx):
    print('R', end='')

for _ in range(ty-sy):
    print('U', end='')

for _ in range(tx-sx):
    print('L', end='')

for _ in range(ty-sy+1):
    print('D', end='')

for _ in range(tx-sx+1):
    print('R', end='')

for _ in range(ty-sy+1):
    print('U', end='')

print('LU', end='')

for _ in range(tx-sx+1):
    print('L', end='')

for _ in range(ty-sy+1):
    print('D', end='')

print('R')

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
ans = ""
dx = tx-sx
dy = ty-sy

for i in range(dy):
    ans += "U"
for i in range(dx):
    ans += "R"
for i in range(dy):
    ans += "D"
for i in range(dx):
    ans += "L"
ans += "L"
for i in range(dy+1):
    ans += "U"
for i in range(dx+1):
    ans += "R"
ans += "D"
ans += "R"
for i in range(dy+1):
    ans += "D"
for i in range(dx+1):
    ans += "L"
ans += "U"

print(ans)

Solution (Python):

sx,sy,tx,ty = map(int, input().split())

path = ''


for y in range(sy,ty):
    path += 'U'

for x in range(sx,tx):
    path += 'R'

for y in range(sy, ty):
    path += 'D'

for x in range(sx, tx):
    path += 'L'


path += 'L'
for y in range(sy, ty):
    path += 'U'

path += 'U'
path += 'R'
for x in range(sx, tx):
    path += 'R'
path += 'D'


path += 'R'
for y in range(sy, ty):
    path += 'D'
path += 'D'

for x in range(sx, tx):
    path += 'L'
path += 'L'
path += 'U'

print(path)

Solution (Python):
sx,sy,tx,ty = map(int, input().strip(' ').split())
dx=tx-sx
dy=ty-sy
print(('R'*dx)+'U'*dy+'L'*dx+'D'*dy+'D'+('R'*(dx+1))+'U'*(dy+1)+'L'+'U'+'L'*(dx+1)+'D'*(dy+1)+'R')

Solution (Python):
sx, sy, tx, ty = map(int,input().split())
ans = []
for i in range(tx-sx):
	ans += 'R'
for i in range(ty-sy):
	ans += 'U'
for i in range(tx-sx):
	ans += 'L'
for i in range(ty-sy+1):
	ans += 'D'
for i in range(tx-sx+1):
	ans += 'R'
for i in range(ty-sy+1):
	ans += 'U'
ans = ans + ['L' , 'U']
for i in range(tx-sx+1):
	ans += 'L'
for i in range(ty-sy+1):
	ans+= 'D'
ans += 'R'
print(''.join(ans))

Solution (Python):
def 解():
    sx,sy,tx,ty = [int(_) for _ in input().split()]

    
    tx = tx - sx
    ty = ty - sy


    if tx != 0 and ty != 0:
        if 0 < ty  and  0 < tx :
            aV = ["U","R","D","L"]
            d1 = ty
            d2 = tx
        elif ty < 0 and 0 < tx :
            aV = ["R","D","L","U"]
            d1 = tx
            d2 = -ty
        elif ty < 0 and tx < 0:
            aV = ["D","L","U","R"]
            d1 = -ty
            d2 = -tx
        elif 0 < ty and tx < 0:
            aV = ["L","U","R","D"]
            d1 = -tx
            d2 = ty
        print("".join( [aV[0]*d1,aV[1]*d2,aV[2]*d1,aV[3]*(d2+1),aV[0]*(d1+1),aV[1]*(d2+1),aV[2],aV[1],aV[2]*(d1+1),aV[3] * (d2+1), aV[0]]))
    else:
        if 0 < ty and tx == 0:
            aV = ["U","R","D","L"]
            d1 = ty
            d2 = tx
        elif ty == 0 and 0 < tx :
            aV = ["R","D","L","D"]
            d1 = tx
            d2 = ty
        elif ty < 0 and tx == 0 :
            aV = ["D","L","D","R"]
            d1 = ty
            d2 = tx
        elif ty == 0 and tx < 0 :
            aV = ["L","D","R","D"]
            d1 = tx
            d2 = ty
        print("".join([ aV[0]*d1, aV[1], aV[2] * d1, aV[3] * 2, aV[0] * d1, aV[1], aV[0] , aV[1] * 2 , aV[2] * (d1+2),aV[3] * 2, aV[0]]))

解()

Solution (Python):

sx,sy,tx,ty = [int(_) for _ in input().split()]


tx = tx - sx
ty = ty - sy


if tx != 0 and ty != 0:
    aV = ["U","R","D","L"]
    d1 = ty
    d2 = tx
    if ty < 0 and 0 < tx :
        aV = ["R","D","L","U"]
        d1 = tx
        d2 = -ty
    if ty < 0 and tx < 0:
        aV = ["D","L","U","R"]
        d1 = -ty
        d2 = -tx
    if 0 < ty and tx < 0:
        aV = ["L","U","R","D"]
        d1 = -tx
        d2 = ty
    print( aV[0]*d1 + aV[1]*d2 + aV[2]*d1 + aV[3]*(d2+1)
        + aV[0]*(d1+1) + aV[1]*(d2+1) + aV[2] + aV[1] + aV[2]*(d1+1) + aV[3] * (d2+1) + aV[0])
else:
    if 0 < ty and tx == 0:
        aV = ["U","R","D","L"]
        d1 = ty
        d2 = tx
    if ty == 0 and 0 < tx :
        aV = ["R","D","L","D"]
        d1 = tx
        d2 = ty
    if ty < 0 and tx == 0 :
        aV = ["D","L","D","R"]
        d1 = ty
        d2 = tx
    if ty == 0 and tx < 0 :
        aV = ["L","D","R","D"]
        d1 = tx
        d2 = ty
    print( aV[0]*d1 + aV[1] + aV[2] * d1 + aV[3] * 2 + aV[0] * d1 + aV[1] + aV[0] + aV[1] * 2 + aV[2] * (d1+2) + aV[3] * 2 + aV[0])

Solution (Python):
sx,sy,tx,ty = map(int,input().split())
answer = []
dx = tx-sx
dy = ty-sy
answer.append('R'*dx)
answer.append('U'*dy)
answer.append('L'*dx)
answer.append('D'*dy)
answer.append('D')
answer.append('R'*(dx+1))
answer.append('U'*(dy+1))
answer.append('L')
answer.append('U')
answer.append('L'*(dx+1))
answer.append('D'*(dy+1))
answer.append('R')
print("".join(answer))

Solution (Python):
def solve(sx, sy, tx, ty):
    way1 = "R" * (tx - sx) + "U" * (ty - sy)
    way2 = "L" * (tx - sx) + "D" * (ty - sy)
    way3 = "D" + "R" * (tx - sx + 1) + "U" * (ty - sy+ 1) + "L"
    way4 = "U" + "L" * (tx - sx + 1) + "D" * (ty - sy+ 1) + "R"
    return way1 + way2 + way3 + way4

if __name__ == "__main__":
    sx, sy, tx, ty = map(int, input().split(" "))
    print(solve(sx, sy, tx, ty))

Solution (Python):
def solve(sx, sy, tx, ty):
    way1 = "R" * (tx - sx) + "U" * (ty - sy)
    way2 = "L" * (tx - sx) + "D" * (ty - sy)
    way3 = "D" + "R" * (tx - sx + 1) + "U" * (ty - sy+ 1) + "L"
    way4 = "U" + "L" * (tx - sx + 1) + "D" * (ty - sy+ 1) + "R"
    return way1 + way2 + way3 + way4

if __name__ == "__main__":
    sx, sy, tx, ty = map(int, input().split(" "))
    print(solve(sx, sy, tx, ty))

Solution (Python):
def solve(sx, sy, tx, ty):
    way1 = "R" * (tx - sx) + "U" * (ty - sy)
    way2 = "L" * (tx - sx) + "D" * (ty - sy)
    way3 = "D" + "R" * (tx - sx + 1) + "U" * (ty - sy+ 1) + "L"
    way4 = "U" + "L" * (tx - sx + 1) + "D" * (ty - sy+ 1) + "R"
    return way1 + way2 + way3 + way4

if __name__ == "__main__":
    sx, sy, tx, ty = map(int, input().split(" "))
    print(solve(sx, sy, tx, ty))

Solution (Python):
def main():
    sx, sy, tx, ty = list(map(int, input().split()))
    dx = tx - sx
    dy = ty - sy
    ans = ''
    
    ans += 'U' * dy + 'R' * dx
    
    ans += 'D' * dy + 'L' * dx
    
    ans += 'L' + 'U' * (dy + 1) + 'R' * (dx + 1) + 'D'
    
    ans += 'R' + 'D' * (dy + 1) + 'L' * (dx + 1) + 'U'
    
    print(ans)
    

if __name__ == "__main__":
    main()

Solution (Python):
a, b, c, d = map(int, input().split())
ans = ""
ans += "U" * (d-b) + "R" * (c-a) + "D" * \
    (d-b) + "L" * (c-a+1) + "U"*(d-b+1) + \
    "R"*(c-a+1)+"DR"+"D"*(d-b+1)+"L"*(c-a+1)+"U"
print(ans)

Solution (Python):

def main():
    buf = input()
    buflist = buf.split()
    sx = int(buflist[0])
    sy = int(buflist[1])
    tx = int(buflist[2])
    ty = int(buflist[3])
    xdiff = tx - sx
    ydiff = ty - sy
    movement = ""
    movement += "R" * xdiff
    movement += "U" * ydiff
    movement += "L" * xdiff
    movement += "D" * ydiff
    movement += "D"
    movement += "R" * (xdiff+1)
    movement += "U" * (ydiff+1)
    movement += "L"
    movement += "U"
    movement += "L" * (xdiff+1)
    movement += "D" * (ydiff+1)
    movement += "R"
    print(movement)

if __name__ == '__main__':
    main()

Solution (Python):


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

sx, sy, tx, ty = map(int, raw_input().split())

S = ''
S += 'R' * (tx - sx)
S += 'U' * (ty - sy)
S += 'L' * (tx - sx)
S += 'D' * (ty - sy)
S += 'D'
S += 'R' * (tx - sx + 1)
S += 'U' * (ty - sy + 1)
S += 'L'
S += 'U'
S += 'L' * (tx - sx + 1)
S += 'D' * (ty - sy + 1)
S += 'R'

print S

Solution (Python):
sx, sy, tx, ty = map(int, input().split())
ans1 = "R"*(tx-sx) + "U"*(ty-sy)
ans2 = "L"*(tx-sx) + "D"*(ty-sy)
ans3 = "D" + "R"*(tx-sx+1) + "U"*(ty-sy+1) + "L"
ans4 = "U" + "L"*(tx-sx+1) + "D"*(ty-sy+1) + "R"

print(ans1+ans2+ans3+ans4)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

dx, dy = tx - sx, ty - sy
print('U' * dy + 'R' * (dx + 1) + 'D' * (dy + 1) + 'L' * (dx + 1) + 'U' + \
      'R' * dx + 'U' * (dy + 1) + 'L' * (dx + 1) + 'D' * (dy + 1) + 'R')

Solution (Python):
def inpl(): return [int(i) for i in input().split()]

sx,sy,tx,ty = inpl()

uplen = ty - sy
rightlen = tx - sx

print('U' * uplen + 'R' * rightlen +
      'D' * uplen + 'L' * (rightlen + 1) +
      'U' * (uplen + 1) + 'R' * (rightlen + 1) + 'D' +
      'R' + 'D' * (uplen + 1) + 'L' * (rightlen + 1) + 'U' )

Solution (Python):
a,b,c,d = map(int, input().split())
x,y = c-a,d-b
s = "U"*y+"R"*x+"D"*y+"L"*x
s += "L"+"U"*(y+1)+"R"*(x+1)+"DR"+"D"*(y+1)+"L"*(x+1)+"U"
print(s)

Solution (Python):
sx, sy, tx, ty = map(int, input().split())

dx = tx - sx
dy = ty - sy

ans = ''

ans += 'U' * dy
ans += 'R' * dx

ans += 'D' * dy
ans += 'L' * (dx+1)

ans += 'U' * (dy+1)
ans += 'R' * (dx+1)
ans += 'D'

ans += 'R' 
ans += 'D' * (dy+1)
ans += 'L' * (dx+1)
ans += 'U'

print(ans)

Solution (Python):
def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))

sx, sy, tx,ty = getList()
xdis = tx-sx
ydis = ty-sy

move = []
move = move + ["R"] * xdis
move = move + ["U"] * ydis
move = move + ["L"] * xdis
move = move + ["D"] * ydis
move = move + ["D"]
move = move + ["R"] * (xdis+1)
move = move + ["U"] * (ydis+1)
move = move + ["L"]
move = move + ["U"]
move = move + ["L"] * (xdis+1)
move = move + ["D"] * (ydis+1)
move = move + ["R"]

print("".join(move))