matrix = [[2, 3, 6, 8, 10],[5, 4, 7, 9, 12],[1, 11, 14, 16, 18],[13, 15, 20, 22, 24],[17, 19, 26, 28, 30]]
for i in range(5):for j in range(5):if i == j:if matrix[i][j] % 2 == 0:matrix[i][j] = 0else:matrix[i][j] = 1
for row in matrix:print(row)
matrix = [
[2, 3, 6, 8, 10],
[5, 4, 7, 9, 12],
[1, 11, 14, 16, 18],
[13, 15, 20, 22, 24],
[17, 19, 26, 28, 30]
]
for i in range(5):
for j in range(5):
if i == j:
if matrix[i][j] % 2 == 0:
matrix[i][j] = 0
else:
matrix[i][j] = 1
for row in matrix:
print(row)