Fixed row column constraint using the wrong row for values already given.
Added encoding for the row-number constraint set.