At the risk of incurring the wrath of the mods:
I ran the code you posted. Looking at the first eight numbers, 0 is bad as it has to be. The other seven answers are 0, 1, 0, 2, 0, 1, 0. For the problem, they need to be 0, 1, 1, 2, 2, 2, 2. These do not appear, to me, to be the same numbers.