#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int t;
  long long int a, b;
  scanf("%d", &t);
  while (t--) {
    scanf("%lld%lld", &a, &b);
    if (a <= b) {
      if (a & 1)
        printf("R\n");
      else
        printf("L\n");
    } else {
      if (b & 1)
        printf("D\n");
      else
        printf("U\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     11e6 <main+0xc6>
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jg     11ad <main+0x8d>
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     119c <main+0x7c>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    11a8 <main+0x88>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
mov    -0x18(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     11d0 <main+0xb0>
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
jmp    11dc <main+0xbc>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
jmp    1141 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
subl   $0x1,0x4(%rsp)
jae    1159 <main+0x39>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xea3(%rip),%r14
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%rbx
lea    0xe9b(%rip),%r12
lea    0xe98(%rip),%rbp
lea    0xe93(%rip),%r13
jmp    119c <main+0x7c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <puts@plt>
subl   $0x1,0x4(%rsp)
jb     1148 <main+0x28>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%rax
mov    0x8(%rsp),%rcx
cmp    %rcx,%rax
jle    11d0 <main+0xb0>
mov    %r12,%rdi
test   $0x1,%cl
je     1190 <main+0x70>
lea    0xe44(%rip),%rdi
jmp    1190 <main+0x70>
nopl   0x0(%rax)
mov    %rbp,%rdi
test   $0x1,%al
je     1190 <main+0x70>
mov    %r13,%rdi
jmp    1190 <main+0x70>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%lld%lld\00"
@.str.2 = [3 x i8] c"R\0A\00"
@.str.3 = [3 x i8] c"L\0A\00"
@.str.4 = [3 x i8] c"D\0A\00"
@.str.5 = [3 x i8] c"U\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %33, %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %34
10: ; preds = %6
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64* %3, i64* %4)
%12 = load i64, i64* %3
%13 = load i64, i64* %4
%14 = icmp sle i64 %12, %13
br i1 %14, label %15, label %24
15: ; preds = %10
%16 = load i64, i64* %3
%17 = and i64 %16, 1
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %23
21: ; preds = %15
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %23
23: ; preds = %21, %19
br label %33
24: ; preds = %10
%25 = load i64, i64* %4
%26 = and i64 %25, 1
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %32
30: ; preds = %24
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
br label %33
33: ; preds = %32, %23
br label %6
34: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%lld%lld\00"
@str = [2 x i8] c"U\00"
@str.6 = [2 x i8] c"D\00"
@str.7 = [2 x i8] c"L\00"
@str.8 = [2 x i8] c"R\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i32* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = add nsw i32 %8, -1
store i32 %9, i32* %1
%10 = icmp eq i32 %8, 0
br i1 %10, label %30, label %11
11: ; preds = %0, %24
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64* %2, i64* %3)
%13 = load i64, i64* %2
%14 = load i64, i64* %3
%15 = icmp sgt i64 %13, %14
br i1 %15, label %20, label %16
16: ; preds = %11
%17 = and i64 %13, 1
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0)
br label %24
20: ; preds = %11
%21 = and i64 %14, 1
%22 = icmp eq i64 %21, 0
%23 = select i1 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0)
br label %24
24: ; preds = %20, %16
%25 = phi i8* [ %19, %16 ], [ %23, %20 ]
%26 = call i32 @puts(i8* dereferenceable(1) %25)
%27 = load i32, i32* %1
%28 = add nsw i32 %27, -1
store i32 %28, i32* %1
%29 = icmp eq i32 %27, 0
br i1 %29, label %30, label %11
30: ; preds = %24, %0
ret i32 0
}