Buggy python submission (verdict: Runtime Error):
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

H, W = map(int, input().split())
board = [0]*(H+1)
for i in range(1, H+1):
    board[i] = [0] + list(map(int, input().split()))

#
ans = []
for y in range(1, H+1):
    if y % 2 == 1:
        for x in range(1, W):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x+1))
                board[y][x+1] += 1
        if y != H:
            now = board[y][W]
            if now % 2 != 0:
                ans.append((y, W, y + 1, W))
                board[y+1][W] += 1
    else:
        for x in reversed(range(2, W+1)):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x-1))
                board[y][x-1] += 1
        if y != H:
            now = board[y][1]
            if now % 2 != 0:
                ans.append((y, 1, y+1, 1))
                board[y+1][1] += 1

print(len(ans))
for (a, b, c, d) in ans:
    print(f"{a} {b} {c} {d}")


Fixed submission:
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

H, W = map(int, input().split())
board = [0]*(H+1)
for i in range(1, H+1):
    board[i] = [0] + list(map(int, input().split()))

#
ans = []
for y in range(1, H+1):
    if y % 2 == 1:
        for x in range(1, W):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x+1))
                board[y][x+1] += 1
        if y != H:
            now = board[y][W]
            if now % 2 != 0:
                ans.append((y, W, y + 1, W))
                board[y+1][W] += 1
    else:
        for x in reversed(range(2, W+1)):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x-1))
                board[y][x-1] += 1
        if y != H:
            now = board[y][1]
            if now % 2 != 0:
                ans.append((y, 1, y+1, 1))
                board[y+1][1] += 1

print(len(ans))
for (a, b, c, d) in ans:
    print(str(a) + " " + str(b) + " " + str(c) + " " + str(d))

Buggy python submission (verdict: Runtime Error):
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

H, W = map(int, input().split())
board = [0]*(H+1)
for i in range(1, H+1):
    board[i] = [0] + list(map(int, input().split()))

#
ans = []
for y in range(1, H+1):
    if y % 2 == 1:
        for x in range(1, W):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x+1))
                board[y][x+1] += 1
        if y != H:
            now = board[y][W]
            if now % 2 != 0:
                ans.append((y, W, y + 1, W))
                board[y+1][W] += 1
    else:
        for x in reversed(range(2, W+1)):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x-1))
                board[y][x-1] += 1
        if y != H:
            now = board[y][1]
            if now % 2 != 0:
                ans.append((y, 1, y+1, 1))
                board[y+1][1] += 1

for (a, b, c, d) in ans:
    print(f"{a} {b} {c} {d}")



Fixed submission:
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

H, W = map(int, input().split())
board = [0]*(H+1)
for i in range(1, H+1):
    board[i] = [0] + list(map(int, input().split()))

#
ans = []
for y in range(1, H+1):
    if y % 2 == 1:
        for x in range(1, W):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x+1))
                board[y][x+1] += 1
        if y != H:
            now = board[y][W]
            if now % 2 != 0:
                ans.append((y, W, y + 1, W))
                board[y+1][W] += 1
    else:
        for x in reversed(range(2, W+1)):
            now = board[y][x]
            if now % 2 != 0:
                ans.append((y, x, y, x-1))
                board[y][x-1] += 1
        if y != H:
            now = board[y][1]
            if now % 2 != 0:
                ans.append((y, 1, y+1, 1))
                board[y+1][1] += 1

print(len(ans))
for (a, b, c, d) in ans:
    print(str(a) + " " + str(b) + " " + str(c) + " " + str(d))