Just for clarification on the cards. Input1 is the order of the cards top and face down.

I mention making piles and turning them down in the instructions. There is no reason to do this in code however because they are already in that order when you process Input1.

Hope this helps and makes sense.