x = [[0 for i in range(M)] for j in range(N)]