Buggy python submission (verdict: Time Limit Exceeded):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#

"""
ARC103 D
"""

from collections import deque
n = int(input())
xyli = deque([tuple(map(int,input().split())) for i in range(n)])

m = 20
dli = [1 for i in range(20)]

zli = list(map(lambda t:(t[0]+t[1])%2,xyli))

flag=True
if len(set(zli))>1:
    flag = False


oe = zli[0]



if flag:
    if oe==0:
        print(20)
        print(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
        for j in range(n):
            x,y=xyli.popleft()
            ans = []
            if x>0:
                ans = ans + ['R' for i in range(abs(x))]
            elif x<0:
                ans = ans + ['L' for i in range(abs(x))]
            if y>0:
                ans = ans + ['U' for i in range(abs(y))]
            elif y<0:
                ans = ans + ['D' for i in range(abs(y))]
            nn = (20-len(ans))//2
            ans = ans+['L' for i in range(nn)]
            ans = ans+['R' for i in range(nn)]
            print(''.join(ans))
    if oe==1:
        print(19)
        print(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
        for j in range(n):
            x,y=xyli.popleft()
            ans = []
            if x>0:
                ans = ans + ['R' for i in range(abs(x))]
            elif x<0:
                ans = ans + ['L' for i in range(abs(x))]
            if y>0:
                ans = ans + ['U' for i in range(abs(y))]
            elif y<0:
                ans = ans + ['D' for i in range(abs(y))]
            nn = (19-len(ans))//2
            ans = ans+['L' for i in range(nn)]
            ans = ans+['R' for i in range(nn)]
            print(''.join(ans))
else:
    print(-1)

    
            



Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#

"""
ARC103 D
"""

from collections import deque
n = int(input())
xyli = deque([tuple(map(int,input().split())) for i in range(n)])

m = 20
dli = [1 for i in range(20)]

zli = list(map(lambda t:(t[0]+t[1])%2,xyli))

flag=True
if len(set(zli))>1:
    print(-1)
    exit()


oe = zli[0]

ans = []
dli = []
flag =False
if oe == 0:
    xyli = list(map(lambda t:(t[0]+1,t[1]),xyli))
    flag = True

uvli = list(map(lambda t:(t[0]+t[1],t[0]-t[1]),xyli))

def mode(ubin,vbin):
    if ubin and vbin:
        return('R')
    elif (not ubin) and vbin:
        return('D')
    elif ubin and (not vbin):
        return('U')
    else:
        return('L')

if flag:
    print(32)
    print(" ".join(map(str,[1]+[2**(30-i) for i in range(31)])))
else:
    print(31)
    print(" ".join(map(str,[2**(30-i) for i in range(31)])))

for u,v in uvli:
    ubin = format(((2**31-1)+u)//2,'031b')
    vbin = format(((2**31-1)+v)//2,'031b')
    if flag:
        print('L',end='')
    for i in range(31):
        print(mode(int(ubin[i]),int(vbin[i])),end='')
    print()

Buggy python submission (verdict: Time Limit Exceeded):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#

"""
ARC103 D
"""

n = int(input())
xyli = [tuple(map(int,input().split())) for i in range(n)]

m = 20
dli = [1 for i in range(20)]

zli = list(map(lambda t:(t[0]+t[1])%2,xyli))

flag=True
if len(set(zli))>1:
    flag = False


oe = zli[0]



if flag:
    if oe==0:
        print(20)
        print(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
        for j in range(n):
            x,y=xyli.pop(0)
            ans = []
            if x>0:
                ans = ans + ['R' for i in range(abs(x))]
            elif x<0:
                ans = ans + ['L' for i in range(abs(x))]
            if y>0:
                ans = ans + ['U' for i in range(abs(y))]
            elif y<0:
                ans = ans + ['D' for i in range(abs(y))]
            nn = (20-len(ans))//2
            ans = ans+['L' for i in range(nn)]
            ans = ans+['R' for i in range(nn)]
            print(''.join(ans))
    if oe==1:
        print(19)
        print(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
        for j in range(n):
            x,y=xyli.pop(0)
            ans = []
            if x>0:
                ans = ans + ['R' for i in range(abs(x))]
            elif x<0:
                ans = ans + ['L' for i in range(abs(x))]
            if y>0:
                ans = ans + ['U' for i in range(abs(y))]
            elif y<0:
                ans = ans + ['D' for i in range(abs(y))]
            nn = (19-len(ans))//2
            ans = ans+['L' for i in range(nn)]
            ans = ans+['R' for i in range(nn)]
            print(''.join(ans))
else:
    print(-1)

    
            



Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#

"""
ARC103 D
"""

from collections import deque
n = int(input())
xyli = deque([tuple(map(int,input().split())) for i in range(n)])

m = 20
dli = [1 for i in range(20)]

zli = list(map(lambda t:(t[0]+t[1])%2,xyli))

flag=True
if len(set(zli))>1:
    print(-1)
    exit()


oe = zli[0]

ans = []
dli = []
flag =False
if oe == 0:
    xyli = list(map(lambda t:(t[0]+1,t[1]),xyli))
    flag = True

uvli = list(map(lambda t:(t[0]+t[1],t[0]-t[1]),xyli))

def mode(ubin,vbin):
    if ubin and vbin:
        return('R')
    elif (not ubin) and vbin:
        return('D')
    elif ubin and (not vbin):
        return('U')
    else:
        return('L')

if flag:
    print(32)
    print(" ".join(map(str,[1]+[2**(30-i) for i in range(31)])))
else:
    print(31)
    print(" ".join(map(str,[2**(30-i) for i in range(31)])))

for u,v in uvli:
    ubin = format(((2**31-1)+u)//2,'031b')
    vbin = format(((2**31-1)+v)//2,'031b')
    if flag:
        print('L',end='')
    for i in range(31):
        print(mode(int(ubin[i]),int(vbin[i])),end='')
    print()