A = [[1, 2, 3], [4, 5, 6]]
for i in range(len(A)):
for j in range(len(A[i]):
print(A[i][j], end=' ')
print()
matrix = [[1, 2, 3], [4, 5, 6]]
for row in matrix:
for item in row:
print(item, end=' ')
print()
for row in matrix:
print(*row)