Petya has a rectangular Board of size $n \times m$. Initially, $k$ chips are placed on the board, $i$-th chip is located in the cell at the intersection of $sx_i$-th row and $sy_i$-th column.

In one action, Petya can move all the chips to the left, right, down or up by $1$ cell.

If the chip was in the $(x, y)$ cell, then after the operation:   left, its coordinates will be $(x, y - 1)$;  right, its coordinates will be $(x, y + 1)$;  down, its coordinates will be $(x + 1, y)$;  up, its coordinates will be $(x - 1, y)$. 

If the chip is located by the wall of the board, and the action chosen by Petya moves it towards the wall, then the chip remains in its current position.

Note that several chips can be located in the same cell.

For each chip, Petya chose the position which it should visit. Note that it's not necessary for a chip to end up in this position.

Since Petya does not have a lot of free time, he is ready to do no more than $2nm$ actions.

You have to find out what actions Petya should do so that each chip visits the position that Petya selected for it at least once. Or determine that it is not possible to do this in $2nm$ actions.


-----Input-----

The first line contains three integers $n, m, k$ ($1 \le n, m, k \le 200$) — the number of rows and columns of the board and the number of chips, respectively.

The next $k$ lines contains two integers each $sx_i, sy_i$ ($ 1 \le sx_i \le n, 1 \le sy_i \le m$) — the starting position of the $i$-th chip.

The next $k$ lines contains two integers each $fx_i, fy_i$ ($ 1 \le fx_i \le n, 1 \le fy_i \le m$) — the position that the $i$-chip should visit at least once.


-----Output-----

In the first line print the number of operations so that each chip visits the position that Petya selected for it at least once.

In the second line output the sequence of operations. To indicate operations left, right, down, and up, use the characters $L, R, D, U$ respectively.

If the required sequence does not exist, print -1 in the single line.


-----Examples-----
Input
3 3 2
1 2
2 1
3 3
3 2

Output
3
DRD
Input
5 4 3
3 4
3 1
3 3
5 3
1 3
1 4

Output
9
DDLUUUURR

Difficulty: MEDIUM_HARD

Solutions:
(n, m, k) = map(int, input().split())
print(n + m + n * m - 3)
for i in range(n - 1):
	print('U', end='')
for i in range(m - 1):
	print('L', end='')
for i in range(n):
	if i % 2 == 0:
		for j in range(m - 1):
			print('R', end='')
	else:
		for j in range(m - 1):
			print('L', end='')
	if i < n - 1:
		print('D', end='')


(n, m, k) = map(int, input().split())
left = 'D' + 'L' * (m - 1)
right = 'D' + 'R' * (m - 1)
ans = ''.join(['U' * (n - 1), 'L' * (m - 1), 'R' * (m - 1)] + [left if x % 2 == 0 else right for x in range(n - 1)])
print(len(ans))
print(ans)


(r, c, k) = map(int, input().split())
for i in range(2 * k):
	(r1, c1) = map(int, input().split())
print(r - 1 + (c - 1) + (r - 1) + r * (c - 1))
print('U' * (r - 1) + 'L' * (c - 1), end='')
for i in range(r):
	if i != 0:
		print('D', end='')
	if i % 2 == 0:
		print('R' * (c - 1), end='')
	else:
		print('L' * (c - 1), end='')


(n, m, _) = map(int, input().split())
print(n * m + n + m - 3)
st = 'U' * (n - 1) + 'L' * (m - 1)
for i in range(n):
	if i != 0:
		st += 'D'
	if i % 2 == 0:
		st += 'R' * (m - 1)
	else:
		st += 'L' * (m - 1)
print(st)


ch = input()
L = [int(i) for i in ch.split()]
n = L[0]
m = L[1]
k = L[2]
for i in range(2 * k):
	ch = input()
s = ''
for i in range(n - 1):
	s += 'U'
for i in range(m - 1):
	s += 'L'
x = 'R'
for i in range(n):
	for j in range(m - 1):
		s += x
	if i == n - 1:
		break
	s += 'D'
	if x == 'R':
		x = 'L'
	else:
		x = 'R'
print(len(s))
print(s)


from collections import Counter
from collections import deque
from sys import stdin
from bisect import *
from heapq import *
import math
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
mod = int(1000000000.0) + 7
inf = float('inf')
t = 1
for _ in range(t):
	(x, y, k) = gil()
	for _ in range(k):
		gil()
		gil()
	print(x + y + x * y - 3)
	print('U' * (x - 1), end='')
	print('L' * (y - 1), end='')
	for i in range(x):
		print(('L' if i & 1 else 'R') * (y - 1), end='')
		if i != x - 1:
			print('D', end='')
	print()


import sys
input = lambda : sys.stdin.readline().strip()
ipnut = input

def main(t=1):
	for i in range(t):
		(n, m, k) = map(int, input().split())
		print(n + m - 2 + m * n - 1)
		print('U' * (n - 1) + 'L' * (m - 1), end='')
		for i in range(n):
			if i == 0:
				print('R' * (m - 1), end='')
			elif i % 2:
				print('D' + 'L' * (m - 1), end='')
			else:
				print('D' + 'R' * (m - 1), end='')
main()


(n, m, k) = map(int, input().split())
si = []
fi = []
for i in range(k):
	si.append(list(map(int, input().split())))
for i in range(k):
	fi.append(list(map(int, input().split())))
s = ''
s += 'U' * (n - 1) + 'L' * (m - 1)
t = 0
for i in range(n):
	if t == 0:
		s += 'R' * (m - 1)
		t = 1
	else:
		s += 'L' * (m - 1)
		t = 0
	s += 'D'
print(n * m + n + m - 3)
print(s[:-1])


(n, m, k) = map(int, input().split())
n -= 1
m -= 1
ans = 'U' * n + 'L' * m + ('R' * m + 'D' + 'L' * m + 'D') * ((n + 1) // 2) + 'R' * m * ((n + 1) % 2)
if ans and ans[-1] == 'D':
	ans = ans[:-1]
print(len(ans))
print(ans)


(n, m, _) = list(map(int, input().split()))
print(2 * (n - 1) + (n + 1) * (m - 1))
print('U' * (n - 1) + 'L' * (m - 1), end='')
for i in range(n):
	if i != 0:
		print('D', end='')
	if i % 2 == 0:
		print('R' * (m - 1), end='')
	else:
		print('L' * (m - 1), end='')


import sys
input = sys.stdin.readline
(n, m, k) = map(int, input().split())
info = [list(map(int, input().split())) for i in range(k)]
info2 = [list(map(int, input().split())) for i in range(k)]
ans = []
for i in range(n - 1):
	ans.append('U')
for i in range(m - 1):
	ans.append('L')
for i in range(n):
	for j in range(m - 1):
		if i % 2 == 0:
			ans.append('R')
		else:
			ans.append('L')
	if i != n - 1:
		ans.append('D')
print(len(ans))
print(''.join(ans))


(n, m, k) = map(int, input().split())
sxy = [list(map(int, input().split())) for _ in range(k)]
fxy = [list(map(int, input().split())) for _ in range(k)]
ans = 'U' * (n - 1) + 'L' * (m - 1)
for i in range(n):
	if i != 0:
		ans += 'D'
	if i % 2 == 0:
		ans += 'R' * (m - 1)
	else:
		ans += 'L' * (m - 1)
print(len(ans))
print(ans)


(n, m, k) = map(int, input().split())
if n == 1:
	print(m + m - 2)
	print('L' * (m - 1) + 'R' * (m - 1))
elif m == 1:
	print(n + n - 2)
	print('D' * (n - 1) + 'U' * (n - 1))
else:
	res = 'U' * (n - 1) + 'L' * (m - 1)
	for i in range((n - n % 2) // 2):
		res += 'R' * (m - 1) + 'D' + 'L' * (m - 1) + 'D'
	if n % 2 == 1:
		res += 'R' * (m - 1) + 'D'
	print(len(res) - 1)
	print(res[:-1])


def f1():
	import math as m
	T = int(input())
	for i in range(0, T):
		NK = [int(j) for j in input().split(' ')]
		N = NK[0]
		K = NK[1]
		if N % 2 != 0:
			if K % 2 == 0:
				print('NO')
			else:
				sqrt = int(m.sqrt(N))
				if sqrt % 2 == 0:
					sqrt = sqrt - 1
				if 1 <= K <= sqrt:
					print('YES')
				else:
					print('NO')
		elif N % 2 == 0:
			if K % 2 != 0:
				print('NO')
			else:
				sqrt = int(m.sqrt(N))
				if sqrt % 2 != 0:
					sqrt = sqrt - 1
				if 2 <= K <= sqrt:
					print('YES')
				else:
					print('NO')

def JackKnifying(X, y, n=1):
	listofX = list()
	listofy = list()
	import numpy as np
	X = np.array(X)
	y = np.array(y)
	listofX = list()
	listofy = list()
	count = 0
	for I in range(0, len(X) - 1):
		count = I
		X1 = X[0:count]
		X2 = X[count + 1:]
		y1 = y[0:count]
		y2 = y[count + 1:]
		Array2 = Array1 = list()
		if X1.shape[0] == 0:
			listofX.append(X2)
			listofy.append(y2)
		elif X2.shape[0] == 0:
			listofX.append(X1)
			listofy.append(y1)
		else:
			Array1 = np.vstack((X[0:count], X[count + 1:]))
			Array2 = np.hstack((y[0:count], y[count + 1:]))
			listofX.append(Array1)
			listofy.append(Array2)
	for i in listofX:
		print(i)
		print('-' * 80)
	for i in listofy:
		print(i)
		print('- -' * 90)
	return (listofX, listofy)

def f2():
	T = int(input())
	while T != 0:
		T = T - 1
		N = int(input())
		Matrix = list()
		Number = list()
		flag1 = True
		for i in range(0, N):
			l = [int(j) for j in input().split(' ')]
			Matrix.append(l[1:])
			Number.append(l[0])
			if l[0] != N and flag1 == True:
				flag1 = False
		pr = [False] * N
		if flag1 == True:
			print('OPTIMAL')
		else:
			qu = [False] * N
			da = 0
			for i in range(0, len(Matrix)):
				for j in range(0, len(Matrix[i])):
					if pr[Matrix[i][j] - 1] == False:
						da = da + 1
						pr[Matrix[i][j] - 1] = True
						qu[i] = True
						break
			if da == N:
				print('OPTIMAL')
			else:
				flag = False
				for i in range(0, len(qu)):
					if flag == True:
						break
					if qu[i] == False:
						for j in range(0, len(pr)):
							if pr[j] == False:
								print('IMPROVE')
								print(str(i + 1) + str(' ') + str(j + 1))
								flag = True
								break

def A3():
	Array = [int(i) for i in input().split(' ')]
	N = Array[0]
	M = Array[1]
	K = Array[2]
	Initial = list()
	Target = list()
	for i in range(0, 2 * K):
		XY = [int(j) for j in input().split(' ')]
	Sequence = ''
	for i in range(0, N - 1):
		Sequence = Sequence + 'U'
	for i in range(0, M - 1):
		Sequence = Sequence + 'L'
	Lstr = ''
	Rstr = ''
	for i in range(0, M - 1):
		Lstr = Lstr + 'L'
		Rstr = Rstr + 'R'
	for i in range(0, N):
		if i % 2 == 0:
			Sequence = Sequence + Rstr
		else:
			Sequence = Sequence + Lstr
		if i != N - 1:
			Sequence = Sequence + 'D'
	print(len(Sequence))
	print(Sequence)

def f3():
	Array = [int(i) for i in input().split(' ')]
	Initial = []
	Target = []
	K = Array[2]
	N = Array[0]
	M = Array[1]
	import random
	All = list()
	for i in range(0, K):
		XY = [int(j) for j in input().split(' ')]
		Initial.append((XY[0], XY[1]))
	for i in range(0, K):
		XY = [int(j) for j in input().split(' ')]
		Target.append((XY[0], XY[1]))
		All.append((Initial[i][0], Initial[i][1], XY[0], XY[1]))
	if N >= M:
		All = sorted(All, key=lambda x: (x[0], x[1]))
	Initial = list()
	Target = list()
	for i in range(0, K):
		Initial.append((All[i][0], All[i][1]))
		Target.append((All[i][2], All[i][3]))
	Solved = [False] * len(Initial)
	Sequence = ''
	i = 0
	while i < len(Initial):
		Solved[i] = Reached(N, M, Sequence, Initial[i], Target[i])
		if Solved[i] == False:
			New_Coord = GetCoord(N, M, Sequence, Initial[i])
			delX = New_Coord[0] - Target[i][0]
			delY = New_Coord[1] - Target[i][1]
			Sequence = Sequence + Func(delX, delY)
			Solved[i] = Reached(N, M, Sequence, Initial[i], Target[i])
		if len(Sequence) > 2 * M * N:
			print(-1)
			return
		i = i + 1
	print(len(Sequence))
	print(Sequence)

def GetCoord(N, M, S, Initial):
	Xi = Initial[0]
	Yi = Initial[1]
	for i in range(0, len(S)):
		if S[i] == 'D':
			if Xi < N:
				Xi = Xi + 1
		elif S[i] == 'U':
			if Xi > 1:
				Xi = Xi - 1
		elif S[i] == 'R':
			if Yi < M:
				Yi = Yi + 1
		elif S[i] == 'L':
			if Yi > 1:
				Yi = Yi - 1
	return (Xi, Yi)

def Reached(N, M, Strn, Initial, Target):
	Xi = Initial[0]
	Yi = Initial[1]
	Xt = Target[0]
	Yt = Target[1]
	for i in range(0, len(Strn)):
		if Strn[i] == 'D':
			if Xi < N:
				Xi = Xi + 1
		elif Strn[i] == 'U':
			if Xi > 1:
				Xi = Xi - 1
		elif Strn[i] == 'R':
			if Yi < M:
				Yi = Yi + 1
		elif Strn[i] == 'L':
			if Yi > 1:
				Yi = Yi - 1
		if Xi == Xt and Yi == Yt:
			return True
	if Xi == Xt and Yi == Yt:
		return True
	else:
		return False

def Func(delX, delY):
	CurrStr = ''
	if delX < 0:
		for j in range(0, -1 * delX):
			CurrStr = CurrStr + 'D'
	elif delX == 0:
		pass
	else:
		for j in range(0, delX):
			CurrStr = CurrStr + 'U'
	if delY < 0:
		for j in range(0, -1 * delY):
			CurrStr = CurrStr + 'R'
	elif delY == 0:
		pass
	else:
		for j in range(0, delY):
			CurrStr = CurrStr + 'L'
	return CurrStr
A3()


(n, m, k) = [int(x) for x in input().split()]
(chips, dest) = ([], [])
for i in range(k):
	chips.append([int(x) for x in input().split()])
for i in range(k):
	dest.append([int(x) for x in input().split()])
ans = (n - 1) * 'U' + (m - 1) * 'L'
for i in range(n):
	if i % 2 == 0:
		ans += (m - 1) * 'R'
	else:
		ans += (m - 1) * 'L'
	if i != n - 1:
		ans += 'D'
print(len(ans))
print(ans)


import sys
input = sys.stdin.readline
(n, m, k) = map(int, input().split())
ans = []
for _ in range(n - 1):
	ans.append('U')
for _ in range(m - 1):
	ans.append('L')
for _ in range(n):
	if _:
		ans.append('D')
	for __ in range(m - 1):
		ans.append('R' if _ % 2 == 0 else 'L')
assert len(ans) <= 2 * m * n
print(len(ans))
print(''.join(ans))


(n, m, k) = map(int, input().split())
for i in range(2 * k):
	(x, y) = map(int, input().split())
ans = ''
for i in range(n - 1):
	ans += 'U'
for i in range(m - 1):
	ans += 'L'
c = 1
k = ['R', 'L']
for i in range(n - 1):
	c ^= 1
	for i in range(m - 1):
		ans += k[c]
	ans += 'D'
c ^= 1
for i in range(m - 1):
	ans += k[c]
print(len(ans))
print(ans)


(r, c, k) = map(int, input().split())
x = []
y = []
xx = []
yy = []
for i in range(k):
	(a, b) = map(int, input().split())
	x.append(a)
	y.append(b)
for i in range(k):
	(a, b) = map(int, input().split())
	xx.append(a)
	yy.append(b)
print(r - 1 + c - 1 + c * r - 1)
for i in range(r - 1):
	print('U', end='')
for i in range(c - 1):
	print('L', end='')
for i in range(r):
	if i % 2 == 0:
		for j in range(c - 1):
			print('R', end='')
		if i < r - 1:
			print('D', end='')
	else:
		for j in range(c - 1):
			print('L', end='')
		if i < r - 1:
			print('D', end='')


(n, m, k) = map(int, input().split())
print(n - 1 + (m - 1) + n * (m - 1) + (n - 1))
a = 'U' * (n - 1) + 'L' * (m - 1)
b = ''
for i in range(n):
	if i != 0:
		b += 'D'
	if i % 2 == 0:
		b += 'R' * (m - 1)
	if i % 2 == 1:
		b += 'L' * (m - 1)
print(a + b)


def main():
	(n, m, k) = map(int, input().split())
	ops = n - 1 + (m - 1) + n * (m - 1) + (n - 1)
	print(ops)
	moves = 'U' * (n - 1) + 'L' * (m - 1)
	for i in range(n):
		if i != 0:
			moves += 'D'
		if i % 2 == 0:
			moves += 'R' * (m - 1)
		else:
			moves += 'L' * (m - 1)
	print(moves)
main()


import sys
(l, c, k) = map(int, sys.stdin.readline().split())
posl = 0
posc = 0
out = 'U' * (l - 1) + 'L' * (c - 1)
endc = c - 1
if l % 2 == 0:
	endc = 0
while posl != l - 1 or posc != endc:
	if posc == 0:
		out += 'R' * (c - 1)
		posc = c - 1
		if posl != l - 1:
			out += 'D'
			posl += 1
	else:
		out += 'L' * (c - 1)
		posc = 0
		if posl != l - 1:
			out += 'D'
			posl += 1
print(len(out))
print(out)


(n, m, k) = list(map(int, input().split()))
k *= 2
for i in range(k):
	(a, b) = list(map(int, input().split()))
moves = n + m + n * m - 3
print(moves)
ans = 'U' * (n - 1) + 'L' * (m - 1)
for i in range(n):
	if i & 1:
		ans += 'L' * (m - 1)
	else:
		ans += 'R' * (m - 1)
	if i < n - 1:
		ans += 'D'
print(ans)


import io
import os
from collections import Counter, defaultdict, deque

def solve(N, M, K, S, F):
	ans = ['U'] * (N - 1) + ['L'] * (M - 1)
	for i in range(N):
		if i % 2 == 0:
			ans.extend(['R'] * (M - 1))
		else:
			ans.extend(['L'] * (M - 1))
		if i != N - 1:
			ans.append('D')
	assert len(ans) <= 2 * N * M
	return str(len(ans)) + '\n' + ''.join(ans)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
(N, M, K) = [int(x) for x in input().split()]
S = [[int(x) for x in input().split()] for i in range(K)]
F = [[int(x) for x in input().split()] for i in range(K)]
ans = solve(N, M, K, S, F)
print(ans)


(n, m, k) = map(int, input().split())
for i in range(2 * k):
	(a, b) = map(int, input().split())
	lis = []
lis.append('U' * (n - 1))
lis.append('L' * (m - 1))
prev = 'R'
for i in range(n):
	for j in range(m - 1):
		lis.append(prev)
	if i != n - 1:
		lis.append('D')
	if prev == 'R':
		prev = 'L'
	else:
		prev = 'R'
cnt = 0
for i in lis:
	cnt += len(i)
print(cnt)
for i in lis:
	print(i, end='')


(n, m, k) = map(int, input().split())
l1 = []
for i in range(k):
	l1.append([int(j) for j in input().split()])
l2 = []
for i in range(k):
	l2.append([int(j) for j in input().split()])
total = n * m + n + m - 3
print(total)
print('U' * (n - 1) + 'L' * (m - 1), end='')
for i in range(n):
	if i == n - 1:
		if n % 2 == 0:
			print('L' * (m - 1), end='')
		else:
			print('R' * (m - 1), end='')
	elif i % 2 == 0:
		print('R' * (m - 1), end='')
		print('D', end='')
	else:
		print('L' * (m - 1), end='')
		print('D', end='')


import sys

def run_case():
	(n, m, k) = map(int, input().split())
	print(n + m - 3 + n + n * (m - 1))
	print('U' * (n - 1), end='')
	print('L' * (m - 1), end='')
	for i in range(n):
		print('R' * (m - 1) if i % 2 == 0 else 'L' * (m - 1), end='')
		if i != n - 1:
			print('D', end='')
	print()
run_case()


(n, m, k) = [int(x) for x in input().split()]
for i in range(2):
	for j in range(k):
		(x, y) = [int(x) for x in input().split()]
print(m + n + m * n - 3)
for i in range(n - 1):
	print('U', end='')
for i in range(m - 1):
	print('L', end='')
for i in range(n):
	if not i % 2:
		for j in range(m - 1):
			print('R', end='')
	else:
		for j in range(m - 1):
			print('L', end='')
	if i < n - 1:
		print('D', end='')


import sys
input = sys.stdin.readline
(N, M, K) = map(int, input().split())
for _ in range(K):
	input()
for _ in range(K):
	input()
R = ['U'] * (N - 1) + ['L'] * (M - 1)
for i in range(N):
	R += ['L' if i % 2 else 'R'] * (M - 1)
	if i != N - 1:
		R.append('D')
print(len(R))
print(''.join(R))


from sys import stdin, stdout
(n, m, l) = list(map(int, stdin.readline().split()))
answer = ''
counter = 0
for i in range(n - 1):
	answer += 'U'
	counter += 1
for i in range(m - 1):
	answer += 'L'
	counter += 1
for i in range(n):
	if i % 2 == 0:
		for k in range(m - 1):
			answer += 'R'
			counter += 1
	else:
		for k in range(m - 1):
			answer += 'L'
			counter += 1
	if i != n - 1:
		answer += 'D'
		counter += 1
stdout.write(str(counter) + '\n')
stdout.write(str(answer) + '\n')


import sys
inp = sys.stdin.readline
out = sys.stdout.write
(n, m) = list(map(int, inp().split()[:2]))
result = ''
for i in range(n - 1):
	result = result + 'U'
for i in range(m - 1):
	result = result + 'L'
current = 'R'
for i in range(n):
	for j in range(m - 1):
		result = result + current
	if current == 'L':
		current = 'R'
	else:
		current = 'L'
	if i != n - 1:
		result = result + 'D'
print(len(result))
print(result)


def main():
	(n, m, k) = map(int, input().split())
	act = ['U' * (n - 1) + 'L' * (m - 1)]
	for i in range(n):
		if i % 2 == 0:
			act.append('R' * (m - 1))
		else:
			act.append('L' * (m - 1))
		if i + 1 != n:
			act.append('D')
	ans = ''.join(act)
	print(len(ans))
	print(ans)
main()


import sys
import math
from collections import defaultdict, Counter
input = sys.stdin.readline

def print(x):
	sys.stdout.write(str(x) + '\n')
(n, m, k) = map(int, input().split())
sxm = 0
sym = 0
for i in range(k):
	(sx, sy) = map(int, input().split())
	sym = max(sy, sym)
	sxm = max(sx, sxm)
sxf = 0
syf = 0
for i in range(k):
	(fx, fy) = map(int, input().split())
	syf = max(fy, syf)
	sxf = max(fx, sxf)
ans = n - 1 + m - 1
st = 'U' * (n - 1) + 'L' * (m - 1)
for i in range(n):
	if i % 2 == 0:
		st += 'R' * (m - 1)
	else:
		st += 'L' * (m - 1)
	ans += m
	st += 'D'
print(ans - 1)
print(st[:-1])


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
for _ in range(t):
	(n, m, k) = list(map(int, stdin.readline().rstrip().split()))
	for j in range(2 * k):
		(t1, t2) = list(map(int, stdin.readline().rstrip().split()))
	print(2 * (n - 1) + (n + 1) * (m - 1))
	print('U' * (n - 1) + 'L' * (m - 1), end='')
	for i in range(n):
		if i != 0:
			print('D', end='')
		if i % 2 == 0:
			print('R' * (m - 1), end='')
		else:
			print('L' * (m - 1), end='')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	(n, m, k) = mi()
	a = []
	b = []
	for i in range(k):
		a.append(li())
	for i in range(k):
		b.append(li())
	ans = ''
	for i in range(n - 1):
		ans += 'U'
	for i in range(m - 1):
		ans += 'L'
	f = 0
	for i in range(n):
		f ^= 1
		for j in range(m - 1):
			if f == 1:
				ans += 'R'
			else:
				ans += 'L'
		if i != n - 1:
			ans += 'D'
	print(len(ans))
	print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import exit

def i():
	return input()

def ii():
	return int(input())

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

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

def print_array(a):
	print(' '.join(map(str, a)))
(n, m, k) = iis()

def move(side, distances, chips):
	if side == 'L':
		for i in distances:
			i[0] = max(0, i[0] - 1)
	elif side == 'R':
		for i in distances:
			i[0] = min(len(distances[0]) - 1, i[0] + 1)
	elif side == 'U':
		for i in distances:
			i[1] = max(0, i[1] - 1)
	else:
		for i in distances:
			i[1] = min(i[1] + 1, len(distances) - 1)
	for i in range(len(distances)):
		if distances[i][0] == 0 and distances[i][1] == 0:
			chips.discard(i)
	return (distances, chips)
ans = []
cur = []
chips = set()
for i in range(k):
	cur.append(liis())
	chips.add(i)
should = []
for i in range(k):
	should.append(liis())
for i in range(n - 1):
	ans.append('U')
for i in range(m - 1):
	ans.append('L')
flag = True
for i in range(n):
	for j in range(m - 1):
		if flag:
			ans.append('R')
		else:
			ans.append('L')
	flag = not flag
	if i != n - 1:
		ans.append('D')
print(len(ans))
print(''.join(ans))


(n, m, k) = map(int, input().split())
s = []
f = []
st = ''
for _ in range(k):
	s.append(list(map(int, input().split())))
for _ in range(k):
	f.append(list(map(int, input().split())))
s.sort()
f.sort()
st += (n - 1) * 'U' + (m - 1) * 'L'
for i in range(1, 1 + n):
	if i % 2 == 0:
		st += 'L' * (m - 1)
	else:
		st += 'R' * (m - 1)
	if i != n:
		st += 'D'
if len(st) <= 2 * m * n:
	print(str(len(st)) + '\n' + st)
else:
	print('-1')


a = [int(i) for i in input().split()]
n = a[0]
m = a[1]
k = a[2]
s = []
for _ in range(k):
	s.append([int(i) for i in input().split()])
f = []
for _ in range(k):
	f.append([int(i) for i in input().split()])
ans = []
ans.append((n - 1) * 'U')
ans.append((m - 1) * 'L')
for i in range(n):
	if i != 0:
		ans.append('D')
	if i % 2 == 0:
		ans.append((m - 1) * 'R')
	else:
		ans.append((m - 1) * 'L')
ans = ''.join(ans)
print(len(ans))
print(ans)


from math import ceil, floor
(n, m, k) = map(int, input().split())
s = dict()
d = dict()
ans = ''
for i in range(k):
	s[i + 1] = list(map(int, input().split()))
for i in range(k):
	d[i + 1] = list(map(int, input().split()))
u = n - 1
d = n - 1
l = m - 1 + ceil(n / 2) * (m - 1)
r = floor(n / 2) * (m - 1)
ans = 'U' * (n - 1) + 'L' * (m - 1)
for i in range(n):
	if i % 2 == 0:
		ans = ans + 'R' * (m - 1)
	else:
		ans = ans + 'L' * (m - 1)
	if i != n - 1:
		ans = ans + 'D'
s = l + d + u + r
if s > 2 * n * m:
	print(-1)
else:
	print(s)
	print(ans)


def task4(n, m, k, start, end):
	print(n + m + n * m - 3)
	for i in range(n - 1):
		print('U', end='')
	for i in range(m - 1):
		print('L', end='')
	for i in range(n):
		if i:
			print('D', end='')
		for j in range(m - 1):
			if i % 2:
				print('L', end='')
			else:
				print('R', end='')
[n, m, k] = input().split()
start = []
end = []
for i in range(int(k)):
	[x, y] = input().split()
	start.append([int(x), int(y)])
for i in range(int(k)):
	[x, y] = input().split()
	end.append([int(x), int(y)])
task4(int(n), int(m), int(k), start, end)


(n, m, k) = map(int, input().split(' '))
ip = []
fp = []
for i in range(k):
	(x, y) = map(int, input().split(' '))
	ip.append([x, y])
for i in range(k):
	(x, y) = map(int, input().split(' '))
	fp.append([x, y])
(lu, ld, ru, rd) = ([], [], [], [])
print(n + m + n * m - 3)
print('U' * (n - 1), end='')
print('L' * (m - 1), end='')
for i in range(n):
	if i != 0:
		print('D', end='')
	if i % 2 == 0:
		print('R' * (m - 1), end='')
	else:
		print('L' * (m - 1), end='')


(n, m, k) = map(int, input().split())
s = list(['U' for x in range(n - 1)])
s.extend(['L' for x in range(m - 1)])
odd = ['L' for x in range(m - 1)]
even = ['R' for x in range(m - 1)]
for x in range(2 * k):
	(a, b) = input().split()
for y in range(n):
	if y % 2 == 0:
		s.extend(even)
	else:
		s.extend(odd)
	s.append('D')
print(len(s) - 1)
print(''.join(s[:len(s) - 1]))


(n, m, k) = map(int, input().split())
a = []
b = []
for i in range(k):
	g = list(map(int, input().split()))
	a.append(g)
for i in range(k):
	g = list(map(int, input().split()))
	b.append(g)
print(n - 1 + (m - 1) + n * (m - 1) + (n - 1))
ans = 'U' * (n - 1)
ans += 'L' * (m - 1)
for i in range(n):
	if i != 0:
		ans += 'D'
	if i % 2 == 0:
		ans += 'R' * (m - 1)
	else:
		ans += 'L' * (m - 1)
print(ans)


(m, n, k) = map(int, input().split())
s = 'U' * (m - 1) + 'L' * (n - 1)
c = 0
for i in range(m):
	if c == 0:
		s += 'R' * (n - 1) + 'D'
		c = 1
	else:
		c = 0
		s += 'L' * (n - 1) + 'D'
print(m * n + m + n - 3)
print(s[:m * n + m + n - 3])


def main():
	import sys
	input = sys.stdin.buffer.readline
	(H, W, K) = map(int, input().split())
	N = H - 1 + W - 1 + H * W - 1
	print(N)
	ans = [''] * N
	for i in range(H - 1):
		ans[i] = 'U'
	for i in range(H - 1, H + W - 2):
		ans[i] = 'L'
	flg = 1
	N0 = H - 1 + W - 2
	for i in range(1, H * W):
		if i % W == 0:
			flg ^= 1
			ans[i + N0] = 'D'
		elif flg:
			ans[i + N0] = 'R'
		else:
			ans[i + N0] = 'L'
	print(''.join(ans))
main()


from sys import stdin, stdout
(n, m, k) = map(int, stdin.readline().split(' '))
if n > 1 and n / (n - 1) <= m:
	seq = []
	seq.append('U' * (n - 1))
	seq.append('L' * (m - 1))
	for i in range(1, n + 1):
		if i % 2 == 0:
			seq.append('L' * (m - 1))
		else:
			seq.append('R' * (m - 1))
		seq.append('D')
	s = ''.join(seq[:-1])
	stdout.write(str(len(s)))
	stdout.write('\n')
	stdout.write(s)
else:
	seq = []
	if n == 1:
		seq.append('L' * (m - 1))
		seq.append('R' * (m - 1))
	else:
		seq.append('U' * (n - 1))
		seq.append('D' * (n - 1))
	s = ''.join(seq)
	stdout.write(str(len(s)))
	stdout.write('\n')
	stdout.write(s)


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

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

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

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
(n, m, k) = inputnums()
print(2 * (n - 1) + (n + 1) * (m - 1))
print('U' * (n - 1) + 'L' * (m - 1), end='')
for i in range(n):
	if i != 0:
		print('D', end='')
	if i % 2 == 0:
		print('R' * (m - 1), end='')
	else:
		print('L' * (m - 1), end='')


(n, m, k) = map(int, input().split())
x = []
for i in range(k):
	x.append(list(map(int, input().split())))
y = []
for i in range(k):
	y.append(list(map(int, input().split())))
ans = ''
ans += 'U' * (n - 1)
ans += 'L' * (m - 1)
d = 1
for i in range(n):
	if i % 2 == 0:
		ans += 'R' * (m - 1)
	else:
		ans += 'L' * (m - 1)
	if i != n - 1:
		ans += 'D'
print(len(ans))
print(ans)


def main():
	(n, m, _) = map(int, input().split())
	print(2 * (n - 1) + (n + 1) * (m - 1))
	print('U' * (n - 1) + 'L' * (m - 1), end='')
	for i in range(n):
		if i != 0:
			print('D', end='')
		if i % 2 == 0:
			print('R' * (m - 1), end='')
		else:
			print('L' * (m - 1), end='')
	return
main()


(m, n, k) = map(int, input().split())
source = []
for i in range(k):
	(a, b) = map(int, input().split())
	source.append((a, b))
dest = []
for i in range(k):
	(a, b) = map(int, input().split())
	dest.append((a, b))
moves = n + m + m * n - 3
print(moves)
print('U' * (m - 1) + 'L' * (n - 1), end='')
for i in range(m):
	if i % 2 == 1:
		print('L' * (n - 1), end='')
	else:
		print('R' * (n - 1), end='')
	if i < m - 1:
		print('D', end='')


(n, m, k) = map(int, input().split())
sx = []
sy = []
fx = []
fy = []
for i in range(k):
	(a, b) = map(int, input().split())
	sx.append(a)
	sy.append(b)
for i in range(k):
	(a, b) = map(int, input().split())
	fx.append(a)
	fy.append(b)

def dist(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def route(x1, y1, x2, y2):
	res = ''
	if x1 - x2 >= 0:
		res += 'U' * (x1 - x2)
	else:
		res += 'D' * (x2 - x1)
	if y1 - y2 >= 0:
		res += 'L' * (y1 - y2)
	else:
		res += 'R' * (y2 - y1)
	x = x2 - x1
	y = y2 - y1
	return (res, x, y)
res = ''
res += (n - 1) * 'U'
res += (m - 1) * 'L'
for i in range(n):
	if i % 2 == 0:
		res += (m - 1) * 'R'
	else:
		res += (m - 1) * 'L'
	if i != n - 1:
		res += 'D'
print(len(res))
print(res)
n * m + n


(n, m, k) = map(int, input().split())
Sx = [0] * k
Sy = [0] * k
for i in range(k):
	(Sx[i], Sy[i]) = map(int, input().split())
Fx = [0] * k
Fy = [0] * k
for i in range(k):
	(Fx[i], Fy[i]) = map(int, input().split())
ans = []
ans += ['U'] * (n - 1)
ans += ['L'] * (m - 1)
for i in range(n):
	if i % 2 == 0:
		ans += ['R'] * (m - 1)
	else:
		ans += ['L'] * (m - 1)
	if i != n - 1:
		ans += ['D']
print(len(ans))
print(''.join(ans))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
data = list(invr())
row = data[0]
col = data[1]
chips = data[2]
chips *= 2
while chips > 0:
	d = list(invr())
	chips -= 1
moves = row + col + row * col - 3
print(moves)
for i in range(row - 1):
	print('U', end='')
for i in range(col - 1):
	print('L', end='')
for i in range(row):
	if i & 1:
		for j in range(col - 1):
			print('L', end='')
	else:
		for j in range(col - 1):
			print('R', end='')
	if i < row - 1:
		print('D', end='')


(n, m, k) = input().split()
(n, m, k) = (int(n), int(m), int(k))
xys = []
for i in range(k):
	xys.append(input().split())
maxL = 0
maxR = 0
maxU = 0
maxD = 0
for i in range(k):
	(xn, yn) = input().split()
	(xn, yn) = (int(xn), int(yn))
	maxL = max(int(xys[i][1]) - yn, maxL)
	maxR = max(yn - int(xys[i][1]), maxR)
	maxU = max(int(xys[i][0]) - xn, maxU)
	maxD = max(xn - int(xys[i][0]), maxD)
res = ''
for i in range(n - 1):
	res += 'U'
for i in range(m - 1):
	res += 'L'
for x in range(n):
	if x % 2 == 0:
		for y in range(m - 1):
			res += 'R'
	else:
		for y in range(m - 1):
			res += 'L'
	if x != n - 1:
		res += 'D'
print(len(res))
print(res)


import sys
(n, m, k) = list(map(int, sys.stdin.readline().strip().split()))
for i in range(0, 2 * k):
	x = sys.stdin.readline()
print(n + m + n * m - 3)
ans = []
for i in range(0, n - 1):
	ans.append('U')
for i in range(0, m - 1):
	ans.append('L')
v = True
for i in range(0, n):
	for j in range(0, m - 1):
		if v == True:
			ans.append('R')
		else:
			ans.append('L')
	if i != n - 1:
		ans.append('D')
	if v == True:
		v = False
	else:
		v = True
print(''.join(ans))