Buggy python submission (verdict: Runtime Error):
N = int(input())

X = [0] * N
Y = [0] * N

X[0],Y[0] = map(int,input().split(" "))
ev = abs(X[0] + Y[0])%2
flg = False
for i in range(N-1):
    X[i+1],Y[i+1] = map(int,input().split(" "))
    if abs(X[i+1] + Y[i+1]) % 2 != ev:
        flg = True

if flg:
    print(-1)
    exit(0)

if ev == 1:
    m =  39
else:
    m = 40

stop = "LR"

print(m)
print('1 ' * (m-1) + '1')
for i in range(N):
    need = (abs(X[i])+abs(Y[i]))
    s = stop * (m - need)
    if X[i] < 0:
        s += ("L" * abs(X[i]))
    else:
        s += ("R" * abs(X[i]))
        
    if Y[i] < 0:
        s += ("D" * abs(Y[i]))
    else:
        s += ("U" * abs(Y[i]))

    print(s)

Fixed submission:
N = int(input())
X,Y = [0]*N,[0]*N
U,V = [0]*N,[0]*N
mod = [0] * N
for i in range(N):
    X[i],Y[i] = map(int,input().split(" "))
    mod[i] = (X[i] + Y[i]) % 2
    U[i],V[i] = (X[i]+Y[i]),(X[i]-Y[i])

l = len(list(filter(lambda x: x == 1,mod)))

if l != 0 and l != N:
    print(-1)
    exit(0)

# 偶数
if l == 0:
    d = [ 1 << i for i in range(38,-1,-1) ] + [1]

else:
    d = [ 1 << i for i in range(39,-1,-1) ]

ans = []
for i in range(N):
    move = []
    curU,curV = 0,0
    for step in d:
        if curU <= U[i] and curV <= V[i]:
            curU += step
            curV += step
            move.append('R')

        elif curU > U[i] and curV <= V[i]:
            curU -= step
            curV += step
            move.append('D')

        elif curU <= U[i] and curV > V[i]:
            curU += step
            curV -= step
            move.append('U')

        elif curU > U[i] and curV > V[i]:
            curU -= step
            curV -= step
            move.append('L')

    ans.append(move)

print(len(d))
print(*d)
for i in range(N):
    print("".join(ans[i]))

Buggy python submission (verdict: Runtime Error):
N = int(input())

X = [0] * N
Y = [0] * N


X[0],Y[0] = map(int,input().split(" "))
ev = (X[0] + Y[0])%2
flg = False
for i in range(N-1):
    X[i+1],Y[i+1] = map(int,input().split(" "))
    if(X[i+1] + Y[i+1] ) % 2 != ev:
        flg = True

if flg:
    print(-1)
    exit(0)

if ev == 1:
    m =  39
else:
    m = 40

stop = "LR"

print(m)
d = [ 1 for i in range(m) ]
print(*d)
for i in range(N):
    need = (abs(X[i])+abs(Y[i]))
    s = stop * (m - need)
    if X[i] < 0:
        s += ("L" * abs(X[i]))
    else:
        s += ("R" * abs(X[i]))
    if Y[i] < 0:
        s += ("D" * abs(Y[i]))
    else:
        s += ("U" * abs(Y[i]))
    print(s)






Fixed submission:
N = int(input())
X,Y = [0]*N,[0]*N
U,V = [0]*N,[0]*N
mod = [0] * N
for i in range(N):
    X[i],Y[i] = map(int,input().split(" "))
    mod[i] = (X[i] + Y[i]) % 2
    U[i],V[i] = (X[i]+Y[i]),(X[i]-Y[i])

l = len(list(filter(lambda x: x == 1,mod)))

if l != 0 and l != N:
    print(-1)
    exit(0)

# 偶数
if l == 0:
    d = [ 1 << i for i in range(38,-1,-1) ] + [1]

else:
    d = [ 1 << i for i in range(39,-1,-1) ]

ans = []
for i in range(N):
    move = []
    curU,curV = 0,0
    for step in d:
        if curU <= U[i] and curV <= V[i]:
            curU += step
            curV += step
            move.append('R')

        elif curU > U[i] and curV <= V[i]:
            curU -= step
            curV += step
            move.append('D')

        elif curU <= U[i] and curV > V[i]:
            curU += step
            curV -= step
            move.append('U')

        elif curU > U[i] and curV > V[i]:
            curU -= step
            curV -= step
            move.append('L')

    ans.append(move)

print(len(d))
print(*d)
for i in range(N):
    print("".join(ans[i]))