Buggy python submission (verdict: Runtime Error):
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	for j in range(len(p) - 1):
		if p[j] % 2 == 1:
			output.append([i + 1, j + 1, i + 1, j + 2])
			counter += 1
			p[j + 1] += 1
		alle.append(p[-1])
	
for i in range(a - 1):
	if alle[i] % 2 == 1:
		output.append([i + 1, 1,  i + 2, 1])
		counter += 1
		alle[i + 1] = alle[i] + 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Fixed submission:
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	for j in range(len(p) - 1):
		if p[j] % 2 == 1:
			output.append([i + 1, j + 1, i + 1, j + 2])
			counter += 1
			p[j + 1] += 1
	alle.append(p[-1])
	
for i in range(a - 1):
	if alle[i] % 2 == 1:
		output.append([i + 1, len(p),  i + 2, len(p)])
		counter += 1
		alle[i + 1]  += 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Buggy python submission (verdict: Runtime Error):
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	if len(p) >= 1:
		for j in range(len(p) - 1):
			if p[j] % 2 == 1:
				output.append([i + 1, j + 1, i + 1, j + 2])
				counter += 1
				p[j + 1] += 1
		alle.append(p[-1])
	else:
		alle.append(p)
	
for i in range(a - 1):
	if (len(p) > 1):
		if alle[i] % 2 == 1:
			output.append([i + 1, len(p[0]),  i + 2, len(p[0])])
			counter += 1
			alle[i + 1] = alle[i] + 1
	else:
		if alle[i] % 2 == 1:
			output.append([i + 1, 1,  i + 2, 1])
			counter += 1
			alle[i + 1] = alle[i] + 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Fixed submission:
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	for j in range(len(p) - 1):
		if p[j] % 2 == 1:
			output.append([i + 1, j + 1, i + 1, j + 2])
			counter += 1
			p[j + 1] += 1
	alle.append(p[-1])
	
for i in range(a - 1):
	if alle[i] % 2 == 1:
		output.append([i + 1, len(p),  i + 2, len(p)])
		counter += 1
		alle[i + 1]  += 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Buggy python submission (verdict: Runtime Error):
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	if len(p) >= 1:
		for j in range(len(p) - 1):
			if p[j] % 2 == 1:
				output.append([i + 1, j + 1, i + 1, j + 2])
				counter += 1
				p[j + 1] += 1
		alle.append(p[-1])
	else:
		alle.append(p)
	
for i in range(a - 1):
	if (len(p) > 1):
		if alle[i] % 2 == 1:
			output.append([i + 1, len(p[0]),  i + 2, len(p[0])])
			counter += 1
			alle[i + 1] = alle[i] + 1
	else:
		if alle[i] % 2 == 1:
			output.append([i + 1, 1,  i + 2, 1])
			counter += 1
			alle[i + 1] = alle[i] + 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Fixed submission:
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	for j in range(len(p) - 1):
		if p[j] % 2 == 1:
			output.append([i + 1, j + 1, i + 1, j + 2])
			counter += 1
			p[j + 1] += 1
	alle.append(p[-1])
	
for i in range(a - 1):
	if alle[i] % 2 == 1:
		output.append([i + 1, len(p),  i + 2, len(p)])
		counter += 1
		alle[i + 1]  += 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Buggy python submission (verdict: Runtime Error):
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	for j in range(len(p) - 1):
		if p[j] % 2 == 1:
			output.append([i + 1, j + 1, i + 1, j + 2])
			counter += 1
			p[j + 1] += 1
	alle.append(p[-1])
	
for i in range(a - 1):
	if alle[i] % 2 == 1:
		output.append([i + 1, len(p[0]),  i + 2, len(p[0])])
		counter += 1
		alle[i + 1] = alle[i] + 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])

Fixed submission:
a = int(input().split()[0])
alle = []
counter = 0
output = []
for i in range(a):
	p = input().split()
	p = [int(j)%2 for j in p]
	for j in range(len(p) - 1):
		if p[j] % 2 == 1:
			output.append([i + 1, j + 1, i + 1, j + 2])
			counter += 1
			p[j + 1] += 1
	alle.append(p[-1])
	
for i in range(a - 1):
	if alle[i] % 2 == 1:
		output.append([i + 1, len(p),  i + 2, len(p)])
		counter += 1
		alle[i + 1]  += 1
		
print (counter)
for i in output:
	print (i[0],i[1],i[2],i[3])