That looks more like a problem with a different part of your code. I think you should probably post some more code.
Notice that 70, 20, and 50 do appear in the output, and in that order. This tells me that they are inserting properly. But to me, their positions and all the extraneous output would indicate an issue either with the iterators that you're using or your output loop/statements themselves.