Changed getting row and column for S-Boxes.