set 0's row and column
if rotation of substring