Here is some sample output from jfHW5.py: (Solution 1): 1 2 4 3 0 3 1 0 4 2 4 0 2 1 3 2 4 3 0 1 0 3 1 2 4 (Solution 2): 1 4 2 3 0 4 1 3 0 2 2 0 4 1 3 3 2 0 4 1 0 3 1 2 4 (Solution 3): 1 0 4 3 2 2 1 3 4 0 4 2 0 1 3 3 4 2 0 1 0 3 1 2 4 (Solution 4): 1 2 0 3 4 4 1 3 0 2 0 3 2 4 1 2 0 4 1 3 3 4 1 2 0 The first row of these four solutions are: (Sol 1) 1 2 4 3 0 (Sol 2) 1 4 2 3 0 (Sol 3) 1 0 4 3 2 (Sol 4) 1 2 0 3 4 which we check are distinct: one way to see this is to sort these first rows in "dictionary order" (i.e., "lexicographic order"): (Sol 3) 1 0 4 3 2 (Sol 4) 1 2 0 3 4 (Sol 1) 1 2 4 3 0 (Sol 2) 1 4 2 3 0 and we see that Sol 3 is before (and not equal to) Sol 4 (in lexicographical order), and similarly Sol 4 is strictly before Sol 1, and Sol 1 is strictly before Sol 2.