When looking at nested loops, it is easier to follow them if you record not just the number of iterations, but also "which row and column you are currently on." Start by making sure you do not swap ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results