Buggy python submission (verdict: Runtime Error):
n = int(input())
coordinates = []
distance = []

for i in range(n):
    coordinate = list(map(int, input().split()))
    coordinates.append(coordinate)
    distance.append(abs(coordinate[0]) + abs(coordinate[1]))

p = distance[0] & 1
for dist in distance:
    if p != dist & 1:
        print(-1)
        exit()

m = max(distance)
print(m)
print("1" + " 1" * (m - 1))

for i in range(n):
    result = "RL" * ((m - distance[i]) // 2)
    if coordinates[i][0] < 0:
        result += "L" * -coordinates[i][0]
    else:
        result += "R" * coordinates[i][0]
    if coordinates[i][1] < 0:
        result += "D" * -coordinates[i][1]
    else:
        result += "U" * coordinates[i][1]
    print(result)

Fixed submission:
from functools import reduce
import math

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

# parity check and get max
x, y = coord[0]
p = (x + y) & 1
limit = 0
for x, y in coord:
    if p != (x + y) & 1:
        print(-1)
        exit()
    lim = abs(x) + abs(y)
    if lim > limit:
        limit = lim

limit = round(math.log2(limit))
if p == 1:
    d = [2 ** i for i in reversed(range(limit + 1))]
else:
    d = [1] + [2 ** i for i in reversed(range(limit + 1))]

print(len(d))
print(reduce((lambda acc, dist: str(acc) + " " + str(dist)), d))

for x, y in coord:
    u = x + y
    v = x - y

    command = ""
    for i in range(len(d)):
        if u >= 0 and v >= 0:
            command += "R"
            u -= d[i]
            v -= d[i]
        elif u >= 0 > v:
            command += "U"
            u -= d[i]
            v += d[i]
        elif u < 0 <= v:
            command += "D"
            u += d[i]
            v -= d[i]
        elif u < 0 and v < 0:
            command += "L"
            u += d[i]
            v += d[i]

    print(command)

Buggy python submission (verdict: Runtime Error):
n = int(input())
coordinates = []
distance = []

for i in range(n):
    coordinate = list(map(int, input().split()))
    coordinates.append(coordinate)
    distance.append(abs(coordinate[0]) + abs(coordinate[1]))

p = distance[0] & 1
for dist in distance:
    if p != dist & 1:
        print(-1)
        exit()

m = max(distance)
print(m)
print("1" + " 1" * (m - 1))

for i in range(n):
    result = "RL" * ((m - distance[i]) // 2)
    if coordinates[i][0] < 0:
        result += "L" * -coordinates[i][0]
    else:
        result += "R" * coordinates[i][0]
    if coordinates[i][1] < 0:
        result += "D" * -coordinates[i][1]
    else:
        result += "U" * coordinates[i][1]
    print(result)

Fixed submission:
from functools import reduce
import math

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

# parity check and get max
x, y = coord[0]
p = (x + y) & 1
limit = 0
for x, y in coord:
    if p != (x + y) & 1:
        print(-1)
        exit()
    lim = abs(x) + abs(y)
    if lim > limit:
        limit = lim

limit = round(math.log2(limit))
if p == 1:
    d = [2 ** i for i in reversed(range(limit + 1))]
else:
    d = [1] + [2 ** i for i in reversed(range(limit + 1))]

print(len(d))
print(reduce((lambda acc, dist: str(acc) + " " + str(dist)), d))

for x, y in coord:
    u = x + y
    v = x - y

    command = ""
    for i in range(len(d)):
        if u >= 0 and v >= 0:
            command += "R"
            u -= d[i]
            v -= d[i]
        elif u >= 0 > v:
            command += "U"
            u -= d[i]
            v += d[i]
        elif u < 0 <= v:
            command += "D"
            u += d[i]
            v -= d[i]
        elif u < 0 and v < 0:
            command += "L"
            u += d[i]
            v += d[i]

    print(command)