input: 9, [... [...], [...]] where arr format is (sample): [ [1,2,3,4,5,6,7,8,9], [9,8,7,6,5,4,3,2,1], [9,8,7,6,5,6,7,8,9], [9,6,8,7,5,8,7,9,8], ] expected: [ [8], [0], [0,9], [0,8], ]