The funny thing is that when you look at the pieces on the static typing side there is no way to solve the problem at all.
For example, the piece which has two legs of the giraffe should to at the bottom most position but it doesn't have a single straight edge so it can't be a bottom most piece.
A deeper message is....
Dynamic typing: Solve your problems but leave bugs because you moved too fast.
Static typing: Discover that there is no sound solution, then have to manually cut and glue pieces together to satisfy your type checker.