eg. In reality, a has 100s thousands of rows
a = array([[0, 0, 0, 0, 0], [1, 0, 0, 0, 0], [1, 1, 0, 0, 1], [1, 1, 0, 0, 0],