finished matrix 2, which has different length rows