Big Spider Solitaire

Spider Robert loves various intellectual games.
Especially, he likes to play a variety of solitaires to pass the time in the evening.
Today in the Big Spider Solitaire game, we will try to decompose one of them together.
Before us on the screen will be visible cards.
You will need to put them in stacks of thirteen cards in one pile.
Cards will need to be reduced in value and vary in color.
For example, at the six of the peak, we will have to put the top five in the red suit.
Thus, laying out a series of cards we will disassemble all the piles.