Buggy python submission (verdict: Runtime Error):
s = input()
h, w = map(int, s.split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)


Fixed submission:
s = input()
h, w = map(int, s.split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w-1):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)

Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)


Fixed submission:
s = input()
h, w = map(int, s.split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w-1):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)

Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0 
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)



Fixed submission:
s = input()
h, w = map(int, s.split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w-1):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)